Comment 3 for bug 127152

Revision history for this message
Till Kamppeter (till-kamppeter) wrote : Re: Samba printers are not displayed

findsmb is a Perl script which uses nmblookup for the actual work. Differences between s-c-p (/usr/share/system-config-printer/pysmb.py) and findsmb (/usr/bin/findsmb) are:

- s-c-p has WINS support, findsmb not
- s-c-p uses "nmblookup -M -- -" to get the domain master browers and "nmblookup -A <IP>" to get womain/workgroup and NetBIOS name for them. Then it looks up the available servers with "smbclient -N -L //<IP of domain master browser>". findsmb uses simply "nmblookup '*'" for getting a list of the IPs of all the available SMB servers and then "nmblookup -A <IP>" to get womain/workgroup and NetBIOS name for each server
- Both s-c-p and findsmb use "nmblookup -A <IP>" to get womain/workgroup and NetBIOS name for a given IP
- findsmb also uses "gethostbyaddr" to get the host name if a NetBIOS name was not found, s-c-p does not do this.

Perhaps the "smbclient -N -L //<IP of domain master browser>" needs to be replaced by some nmblookup call and also the "gethostbyaddr" needs to be implemented.

I cannot do these changes as I do not have a Windows box for testing. Tim or Patrice, can someone of you try? On my Samba server (Ubuntu Gutsy with default smb.conf) both s-c-p and findsmb work correctly.