LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1264|回复: 4

Freebsd 6.1 samba网络邻居连接故障

[复制链接]
发表于 2006-5-23 20:39:29 | 显示全部楼层 |阅读模式
#
# 系统配置:Windows xp(sp2) + vmware 5.5.1(FreeBSD 6.1)
# vmware network connection: Bridged(其他一般都是默认的)
# Windows XP: IP地址192.168.0.9 && FreeBSD: 192.168.0.21
#
# 安装FreeBSD 6.1的时候
# 第一张盘选择ALL 第二张盘选择的是 Kde-3.5.1.tbz和samba-2.2.12_2.tbz
# 安装完以后仅仅设定了一下locale和更新了一下ports
#
# 然后按照教程 如下操作:

freebsd# cd /usr/local/etc
freebsd# cp smb.conf.default smb.conf
freebsd# vi smb.conf
; 做了三处修改
; workgroup = MYGROUP -> workgroup = WORKGROUP
; security = user -> security = share
;而后又把[tmp]前面的分号注释给去掉

freebsd# cd /rc.d
freebsd# cp samba.sh.example samba.sh
freebsd# /usr/local/etc/rc.d/samba.sh start

然后到Windows下在浏览器里面输入:\\192.168.0.21
结果:弹出对话框 找不到目标\\192.168.0.21
(ping 192.168.0.21 显示没问题)
------------------------------------------------------

另:samba 有个内建的网页接口设定工具,按照教程进行如下操作

freebsd# cd /etc
freebsd# vi inetd.conf
在最后取消 关于 sanmba 的注释
netbios-ssn
netbios-ns
swat
继续回到windows下 浏览器里面输入 http://192.168.0.21:901

结果:该页无法显示
---------------------------------------------------------
freebsd# vi /etc/rc.conf
添加:
nmbd_enable="YES"
smbd_enable="YES"

重新启动结果也是一样
--------------------------------------------------------
在Debian 3.1下面 apt-get install samba 然后修改 smb.conf
security=user -> security=share
就可以了
FreeBSD下面还需要另外的设定吗??
发表于 2006-5-24 15:02:16 | 显示全部楼层
swat需要启动inetd,inetd启动没有?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-24 16:00:56 | 显示全部楼层
Post by congli
swat需要启动inetd,inetd启动没有?


谢谢,这个问题已经解决

方法:在/etc/rc.conf中添加 inetd_enable="YES" 即可

另外又添加了 samba_enable="YES"
                    nmbd_enable="YES"
                    smbd_enable="YES"

windows还是不能访问FreeBSD...一下是testparm的结果:
-----------------------------------------------------------------
Load smb config files from /usr/local/etc/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[tmp]"
Loaded services file OK.
Press enter to see a dump of your service definitions
# Global parameters
[global]
        coding system =
        client code page = 850
        code page directory = /usr/local/etc/codepages
        workgroup = WORKGROUP
        netbios name = BSD
        netbios aliases =
        netbios scope =
        server string = Samba Server
        interfaces =
        bind interfaces only = No
        security = SHARE
        encrypt passwords = No
        update encrypted = No
        allow trusted domains = Yes
        hosts equiv =
        min passwd length = 6
        map to guest = Never
        null passwords = No
        obey pam restrictions = No
        password server =
        smb passwd file = /usr/local/private/smbpasswd
        root directory =
        pam password change = No
        passwd program = /usr/bin/passwd
        passwd chat = *\n*ew\spassword* %n\n *ew\spassword* %n\n *updating\sthe\sdatabase...\npasswd:\sdone\n
        passwd chat debug = No
        username map =
        password level = 0
        username level = 0
        unix password sync = No
        restrict anonymous = No
        lanman auth = Yes
        use rhosts = No
        admin log = No
        log level = 0
        syslog = 1
        syslog only = No
        log file = /var/log/log.%m
        max log size = 50
        timestamp logs = Yes
        debug hires timestamp = No
        debug pid = No
        debug uid = No
        protocol = NT1
        large readwrite = Yes
        max protocol = NT1
        min protocol = CORE
        read bmpx = No
        read raw = Yes
        write raw = Yes
        acl compatibility =
        nt smb support = Yes
        nt pipe support = Yes
        nt status support = Yes
        announce version = 4.9
        announce as = NT
        max mux = 50
        max xmit = 16644
        name resolve order = lmhosts host wins bcast
        max ttl = 259200
        max wins ttl = 518400
        min wins ttl = 21600
        time server = No
        unix extensions = No
        change notify timeout = 60
        deadtime = 0
        getwd cache = Yes
        keepalive = 300
        lpq cache time = 10
        max smbd processes = 0
        max disk size = 0
        max open files = 10000
        name cache timeout = 660
        read size = 16384
        socket options = TCP_NODELAY
        stat cache size = 50
        use mmap = Yes
        total print jobs = 0
        load printers = Yes
        printcap name = cups
        disable spoolss = No
        enumports command =
        addprinter command =
        deleteprinter command =
        show add printer wizard = Yes
        os2 driver map =
        strip dot = No
        mangling method = hash
        character set =
        mangled stack = 50
        stat cache = Yes
        domain admin group =
        domain guest group =
        machine password timeout = 604800
        add user script =
        delete user script =
        logon script =
        logon path = \\%N\%U\profile
        logon drive =
        logon home = \\%N\%U
        domain logons = No
        os level = 20
        lm announce = Auto
        lm interval = 60
        preferred master = Auto
        local master = Yes
        domain master = Auto
        browse list = Yes
        enhanced browsing = Yes
        dns proxy = No
        wins proxy = No
        wins server =
        wins support = No
        wins hook =
        kernel oplocks = Yes
        lock spin count = 3
        lock spin time = 10
        oplock break wait time = 0
        add share command =
        change share command =
        delete share command =
        config file =
        preload =
        lock dir = /var/lock
        pid directory = /var/run
        default service =
        message command =
        dfree command =
        valid chars =
        remote announce =
        remote browse sync =
        socket address = 0.0.0.0
        homedir map =
        time offset = 0
        NIS homedir = No
        source environment =
        panic action =
        hide local users = No
        winbind uid =
        winbind gid =
        template homedir = /home/%D/%U
        template shell = /bin/false
        winbind separator = \
        winbind cache time = 15
        winbind enum users = Yes
        winbind enum groups = Yes
        winbind use default domain = No
        comment =
        path =
        alternate permissions = No
        username =
        guest account = nobody
        invalid users =
        valid users =
        admin users =
        read list =
        write list =
        printer admin =
        force user =
        force group =
        read only = Yes
        create mask = 0744
        force create mode = 00
        security mask = 0777
        force security mode = 00
        directory mask = 0755
        force directory mode = 00
        directory security mask = 0777
        force directory security mode = 00
        force unknown acl user = 00
        inherit permissions = No
        inherit acls = No
        guest only = No
        guest ok = No
        only user = No
        hosts allow =
        hosts deny =
        status = Yes
        nt acl support = Yes
        profile acls = No
        block size = 1024
        max connections = 0
        min print space = 0
        strict allocate = No
        strict sync = No
        sync always = No
        write cache size = 0
        max print jobs = 1000
        printable = No
        postscript = No
        printing = cups
        print command =
        lpq command =
        lprm command =
        lppause command =
        lpresume command =
        queuepause command =
        queueresume command =
        printer name =
        use client driver = No
        default devmode = No
        printer driver =
        printer driver file = /usr/local/etc/printers.def
        printer driver location =
        default case = lower
        case sensitive = No
        preserve case = Yes
        short preserve case = Yes
        mangle case = No
        mangling char = ~
        hide dot files = Yes
        hide unreadable = No
        delete veto files = No
        veto files =
        hide files =
        veto oplock files =
        map system = No
        map hidden = No
        map archive = Yes
        mangled names = Yes
        mangled map =
        browseable = Yes
        blocking locks = Yes
        csc policy = manual
        fake oplocks = No
        locking = Yes
        oplocks = Yes
        level2 oplocks = Yes
        oplock contention limit = 2
        posix locking = Yes
        strict locking = No
        share modes = Yes
        copy =
        include =
        exec =
        preexec close = No
        postexec =
        root preexec =
        root preexec close = No
        root postexec =
        available = Yes
        volume =
        fstype = NTFS
        set directory = No
        wide links = Yes
        follow symlinks = Yes
        dont descend =
        magic script =
        magic output =
        delete readonly = No
        dos filemode = No
        dos filetimes = No
        dos filetime resolution = No
        fake directory create times = No
        vfs object =
        vfs options =

[homes]
        comment = Home Directories
        read only = No
        browseable = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        browseable = No

[tmp]
        comment = Temporary file space
        path = /tmp
        read only = No
        guest ok = Yes
--------------------------------------------------------------------
闹了两天了,不知道问题出在那里?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-24 16:04:30 | 显示全部楼层
另:smbclient -L localhost 结果为:
------------------------------------------------
added interface ip=192.168.0.21 bcast=192.168.0.255 nmask=255.255.255.0

Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.2.12]

        Sharename      Type      Comment
        ---------      ----      -------
        tmp            Disk      Temporary file space
        IPC$           IPC       IPC Service (Samba Server)
        ADMIN$         Disk      IPC Service (Samba Server)
        lijunyi        Disk      Home Directories

        Server               Comment
        ---------            -------
        BSD                  Samba Server
        LXY-DC0DE564CA5      

        Workgroup            Master
        ---------            -------
        WORKGROUP            LXY-DC0DE564CA5
-----------------------------------------------------------------------------
这个应该没有问题吧?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-7 17:52:00 | 显示全部楼层
ps -aux | grep nmbd(smbd)
发现 smbd 和 smbd 都没有启动
-------------------------------------
按照手册在 /etc/rc.conf 里面加入
smbd_enable="YES"
smbd_flags="-D"
nmbd_enable="YES"
nmbd_flags="-D"
重新启动以后
进程里面还是没有
------------------------------------
/usr/local/sbin/nmbd -D
/usr/local/sbin/smbd -D
还是没有启动这两个进程
该怎么办啊?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表