我使用的是 sid 的版本,在掛載分享資源時,會出現這樣的錯誤。
- 代碼: 選擇全部
asho@SeXyDebian:~$ smbmount //localhost/asho mnt2
20827: protocol negotiation failed
SMB connection failed
在下掛載的指令時會等很久,但最後卻是 failed...設定檔案都沒更動過,前些日子才這樣。
testparm 的結果
- 代碼: 選擇全部
asho@SeXyDebian:~$ testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
# Global parameters
[global]
workgroup = PARADISE
server string = %h server (Samba %v)
obey pam restrictions = Yes
passdb backend = tdbsam, guest
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
panic action = /usr/share/samba/panic-action %d
invalid users = root
[homes]
comment = Home Directories
read only = No
create mask = 0700
directory mask = 0700
browseable = No
用smbclient 跑 debug 的結果如下:
- 代碼: 選擇全部
asho@SeXyDebian:~$ smbclient -d 4 //localhost/
lp_load: refreshing parameters
Initialising global parameters
params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf"
Processing section "[global]"
doing parameter workgroup = Paradise
doing parameter server string = %h server (Samba %v)
doing parameter dns proxy = no
doing parameter log file = /var/log/samba/log.%m
doing parameter max log size = 1000
doing parameter syslog = 0
doing parameter panic action = /usr/share/samba/panic-action %d
doing parameter encrypt passwords = true
doing parameter passdb backend = tdbsam guest
doing parameter obey pam restrictions = yes
doing parameter invalid users = root
doing parameter passwd program = /usr/bin/passwd %u
doing parameter passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sU NIX\spassword:* %n\n .
doing parameter socket options = TCP_NODELAY
pm_process() returned Yes
added interface ip=192.168.0.198 bcast=192.168.0.199 nmask=255.255.255.248
Client started (version 3.0.5-Debian).
resolve_lmhosts: Attempting lmhosts lookup for name localhost<0x20>
startlmhosts: Can't open lmhosts file /etc/samba/lmhosts. Error was 沒有此一檔案 或目錄
resolve_wins: Attempting wins lookup for name localhost<0x20>
resolve_wins: WINS server resolution selected and no WINS servers listed.
resolve_hosts: Attempting host lookup for name localhost<0x20>
Connecting to 127.0.0.1 at port 445
session request ok
protocol negotiation failed
有關閉防火牆的設定,另外有兩台電腦也是跑 samba-3.0.5,但卻無此問題。:-(