[Samba] nsswitch.conf WINS Configuration Conflict
korbeeck at hotmail.com
Wed Nov 5 17:25:01 GMT 2008
Smbclient worked fluently to create tar compatible backups of all files on an SMB/CIFS share. For which I used an Ubuntu 8.04 LTS Server Edition configuration with LAMP, OpenSSH, Samba and BackupPC packages installed.
Testing with smbclient \\\\win-pc\\share -U administrator -d 3 (debugging level 3) returns:
name_resolve_bcast: Attempting broadcast lookup for name win-pc
Got a positive name query response from 192.168.1.61 ( 192.168.80.1 192.168.40.1 192.168.1.61 )
Connecting to 192.168.1.61 at port 445
Doing spnego session setup (blob length=111)
Domain=[***] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
Although, and here comes the problem, when I add WINS hostname resolution to the native methods used by the UNIX system, controlled by /etc/nsswitch.conf (e.g. hosts: files wins dns), BackupPC encounters errors ("Got fatal error during xfer (No files dumped for share share)") during tar backups of Samba shares.
I added wins to /etc/nsswitch.conf in the first place to make commands like ping win-pc and ssh ubuntu-pc work.
Testing with smbclient \\\\win-pc\\share -U administrator -d 3 now only returns:
resolve_hosts: Attempting host lookup for name win-pc
Workaround: removing hosts from Samba's name resolution order setting in /etc/samba/smb.conf seems to solve the problem, but is in my opinion not the right solution.
Thanks in advance,
Express yourself instantly with MSN Messenger! Download today it's FREE!
More information about the samba