Samba
Samba:僅在手動重啟後有效
我有一個小型 Samba,僅用於 ARM 設備 (SheevaPlug) 上的文件共享。到目前為止一切都很好,但是我決定升級到 Debian 8.1,但由於某種原因,共享無法正常工作。
每當設備啟動時,我都無法訪問 Samba 共享,它們會被宣傳,除了我無法連接之外,我的作業系統說伺服器不可用。
但是,如果我在設備上通過 SSH 手動重新啟動 Samba,請使用:
service smbd restart
股票再次開始運作。所以我決定調查日誌文件並得到這個:
日誌.nmbd:
[2015/08/08 22:45:54.596532, 0] ../lib/util/become_daemon.c:147(daemon_status) STATUS=daemon 'nmbd' : No local IPv4 non-loopback interfaces available, waiting for interface ...NOTE: NetBIOS name resolution is not supported for Internet Protocol Version 6 (IPv6). [2015/08/08 22:45:59.599920, 0] ../lib/util/become_daemon.c:136(daemon_ready) STATUS=daemon 'nmbd' finished starting up and ready to serve connections*****
日誌.smbd:
2015/08/08 22:45:57.881551, 0] ../lib/util/become_daemon.c:136(daemon_ready) STATUS=daemon 'smbd' finished starting up and ready to serve connectionsopen_sockets_smbd: No sockets available to bind to. [2015/08/08 22:45:57.913376, 0] ../source3/lib/util.c:785(smb_panic_s3) PANIC (pid 996): open_sockets_smbd() failed [2015/08/08 22:45:57.923081, 0] ../source3/lib/util.c:896(log_stack_trace)
**我猜 Samba 在網路準備好並開始工作之前就開始了,對嗎?**如果是,我該如何解決這個問題並確保在啟動 Samba 之前網路實際可用?
這是我目前的 Samba 配置:
[global] workgroup = WORKGROUP netbios name = Super-Share server string = Super-Share security = USER invalid users = root encrypt passwords = true lanman auth = No hosts allow = 127.0.0.1 172.20.1.0/24 hosts deny = 0.0.0.0/0 interfaces = eth0 bind interfaces only = yes browseable = Yes max protocol = smb2 socket options = TCP_NODELAY IPTOS_LOWDELAY read raw = No write raw = No use sendfile = Yes refresh = 1 max xmit = 131072 aio write behind = true aio read size = 16384 aio write size = 16384 name resolve order = wins hosts lmhosts bcast dns proxy = No load printers = No printing = bsd printcap name = /dev/null disable spoolss = yes [SU1] path = /mnt/SU1/SU1/ read only = No guest ok = No writable = yes force user = root force group = root create mask = 0777 directory mask = 0777
謝謝。
編輯:
正如我所料,這是一個網路問題。如果我添加:
post-up /etc/init.d/smbd restart
在我的
/etc/network/interfaces
工作正常,但是它很髒,我可以正確解決這個問題嗎?
您可能可以設置
bind interfaces only = no
,因此 Samba 將對介面列表中的更改做出反應。這不應該影響安全。包含在行
lo
內也不會受到傷害。interfaces