天天看點

[分享]如何知道你 Samba 的 Wins Server 達作正常

如果你的 Samba 設定檔 (smb.conf) 有設定當做 WINS Server

代碼:

# Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server wins support = yes

你可以利用以下的指令來查詢 WINS Server 是不是有正常 work

nmblookup -R -U WINS_Server_IP 欲查詢電腦名稱

例:

# nmblookup -R -U 192.168.0.10 test querying test on 192.168.0.10 192.168.128.32 test<00>

# nmblookup -R -U 192.168.0.10 fileserver querying fileserver on 192.168.0.10 192.168.0.10 fileserver<00>

如果你 Samba 的 WINS Server 有不正常的記錄

FreeBSD 請刪除 /var/lock/wins.dat 及 /var/lock/browse.dat

Linux 請刪除 /var/cache/samba/wins.dat 及 /var/cache/samba/browse.dat

重新啟動 Samba,則 Samba 會自動建立這兩個檔案

Windows 指令

清除 WINS cache

C:\>nbtstat -R Successful purge and preload of the NBT Remote Cache Name Table.

向 WINS Server 重新註冊一次 Netbios name

代碼:

繼續閱讀