Dan Bongert
2002-Sep-23 20:06 UTC
[Samba] interesting WINS resolution problem iwth 2.2.5 PDC
I'm running a Samba PDC at home (v2.2.5, recently upgraded from v2.2.3 in an attempt to solve this problem) on RedHat 7.3. I have domain logon, printing and all that good stuff working just fine to a couple of XP and 2000 clients. But, I want to mount a couple shares from the domain clients to the server, and that works just fine except for one client. fujisawa(6) ~> smbmount //cybertron/share /mnt/win INFO: Debug class all level = 3 (pid 28027 from pid 28027) mount.smbfs started (version 2.2.5) added interface ip=192.168.1.60 bcast=192.168.1.255 nmask=255.255.255.0 resolve_lmhosts: Attempting lmhosts lookup for name cybertron<0x20> resolve_hosts: Attempting host lookup for name cybertron<0x20> Connecting to 168.100.250.95 at port 139 All the machines should have 192.168.X.X IP addresses--I'm not sure where it's getting 168.100.250.95 from. A nmblookup finds it just fine: fujisawa(11) ~> nmblookup cybertron querying cybertron on 192.168.1.255 192.168.1.101 cybertron<00> Though I'm not sure where the <0x20> and <00> are supposed to signify. Any thoughts? All the rest of the clients in the domain are resolving properly. (the faulty machine in question was running Win2k Pro, and is now running WinXP Pro after a clean reinstall). -- Dan Bongert <*> dbongert@ssc.wisc.edu Beware by whom you are called sane. - Walter Anderson
Phil Gregory
2002-Sep-23 21:24 UTC
[Samba] interesting WINS resolution problem iwth 2.2.5 PDC
* Dan Bongert <dbongert@ssc.wisc.edu> [2002-09-23 15:04 -0500]:> But, I want to mount a couple shares from the domain clients to the server, > and that works just fine except for one client.The problem is in the manner in which Samba is resolving the name "cybertron" to an IP address.> fujisawa(6) ~> smbmount //cybertron/share /mnt/win > INFO: Debug class all level = 3 (pid 28027 from pid 28027) > mount.smbfs started (version 2.2.5) > added interface ip=192.168.1.60 bcast=192.168.1.255 > nmask=255.255.255.0 > resolve_lmhosts: Attempting lmhosts lookup for name cybertron<0x20>First, it checks lmhosts[0]. It doesn't find anything there, since it goes on the next method.> resolve_hosts: Attempting host lookup for name cybertron<0x20> > Connecting to 168.100.250.95 at port 139The next method is the host method, which uses your system name-to-IP-address resolution (i.e. /etc/hosts, DNS, etc.). If you run 'host cybertron' on fujisawa, it should give you the IP address 168.100.250.95. Check your name resolution settings on that host. I'd start with looking /etc/resolv.conf.> A nmblookup finds it just fine: > > fujisawa(11) ~> nmblookup cybertron > querying cybertron on 192.168.1.255 > 192.168.1.101 cybertron<00>That's because nmblookup defaults to checking for hosts via broadcast, while broadcast is the last thing Samba tries (by default). I'd recommend checking your hostname resolution settings on fujisawa first. Also of use is the smb.conf "name resolve order" directive. It defaults to "lmhosts host wins bcast". I usually set it to "wins lmhosts bcast", since I have a WINS server on my network. Check the smb.conf man page fore more info.> Though I'm not sure where the <0x20> and <00> are supposed to signify.Just for your edification, I'll take this, too. Those are the service type identifiers (not sure what the official terminology is). Hosts using NetBIOS actually list several names for themselves, with the last byte of those names signifying the type of service. Thus, smbmount looks for "cybertron<20>", since 0x20 signifies the file sharing service. nmblookup just looks for "cybertron<00>", with 0x00 referring just to the host's name. [0] You can have a file named lmhosts in the same directory as your smb.conf file. The lmhosts file contains IP address to NetBIOS name mappings. Most people don't use them.