FreeBSD 8.1 RELEASE 上的 Samba35 配置

FreeBSD 8.1 RELEASE 上的 Samba35 配置

我目前正在尝试在轻量级家庭网络上创建 Samba 共享,但在配置从端口树编译的 Samba 3.5.6 时遇到了一些麻烦。

我所寻找的非常基本。我只想要一个不受限制的共享,任何人都可以在我的家庭网络上访问。更具体地说,我不需要并且永远不需要打印。

/usr/local/etc/smb.conf看起来像这样:

#======================= Global Settings =====================================
[global]
   workgroup = WORKGROUP
   server string = Server
   security = user
;   netbios name = Server
   hosts allow = 192.168.1. 127.
   log file = /var/log/samba/log.%m
   max log size = 50
   interfaces = 192.168.1.254/24 192.168.1.253/24
   wins support = yes
   guest account = ftp

#============================ Share Definitions ==============================
[drop]
   comment = Server Drop
   path = /usr/drop/
   public = yes
   writeable = yes
   printable = no
;   admin users = User
   browseable = yes
   guest ok = yes
   hide dot files = yes

当我运行时,testparm我得到以下输出:

$ testparm
Load smb config files from /usr/local/etc/smb.conf
max_open_files: sysctl_max (11095) below minimum Windows limit (16384)
rlimit_max: rlimit_max (11095) below minimum Windows limit (16384)
Processing section "[drop]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
        server string = Server
        interfaces = 192.168.1.254/24, 192.168.1.253/24
        guest account = ftp
        log file = /var/log/samba/log.%m
        max log size = 50
        wins support = Yes
        hosts allow = 192.168.1., 127.

[drop]
        comment = Server Drop
        path = /usr/drop/
        read only = No
        guest ok = Yes

但是,当我尝试在本地测试此连接时,smbclient \\\\localhost\\drop\\我得到以下输出:

$ smbclient \\\\localhost\\drop\\
Enter User's password:
Connection to localhost failed (Error NT_STATUS_INVALID_PARAMETER)

我也遇到过类似的问题https://stackoverflow.com/questions/4034380/why-smb-returns-nt-status-invalid-parameter-how-to-fix-smbclient,但这非常模糊并且没有提供解决方案。

关于该修复什么问题,有什么建议吗?

编辑:问题似乎比这更严重。尽管有这行samba_enable="YES"/etc/rc.conf尽管在启动后重启了几次 samba,但运行ps -ax | grep mbd查看正在运行的内容时,我得到的结果是:

$ ps -aux | grep mdb
root   1802  0.0  0.1  7044  1348   0  R+    9:41PM   0:00.00 grep mdb

这意味着 Samba 根本就没有运行,尽管我尽了一切努力……

$ /usr/local/etc/rc.d/samba restart
Performing sanity check on Samba configuration: OK
smbd not running? (check /var/run/samba/smbd.pid).
nmbd not running? (check /var/run/samba/nmbd.pid).
Removing stale Samba tdb files: ...... done
Starting nmbd.
Starting smbd.

答案1

删除以下行:

wins support = yes
guest account = ftp

并改变路线

interfaces = 192.168.1.254/24 192.168.1.253/24

interfaces = wlan0

然后执行:

$ /usr/local/etc/rc.d/samba stop
smbd not running? (check /var/run/samba/smbd.pid).
Stopping nmbd.
Waiting for PIDS: 2219.
$ /usr/local/etc/rc.d/samba status
nmbd is not running.
smbd is not running.
$ /usr/local/etc/rc.d/samba start
Removing stale Samba tdb files: ....... done
Starting nmbd.
Starting smbd.

问题似乎已经解决了。我猜要么是与 wins 支持发生冲突,要么是来宾帐户ftp不存在,或者诸如此类的愚蠢事情。

相关内容