Samba
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.
刪除行:
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.
似乎已經解決了這個問題。我猜要麼與勝利支持發生衝突,要麼來賓帳戶
ftp
不存在或某些此類愚蠢的業務。