[Samba] smbclient lookup fails when querying local machine
rpunt at good-sam.com
Mon Dec 12 21:57:11 GMT 2005
>> I've got a really odd issue -- a Samba server that can "smbclient -L"
>> everyone but itself.
>> session setup failed: Call timed out: server did not respond after
>> 20000 milliseconds
> This looks a lot like a firewall issue - are you sure your machine can
> connect to itself on that interface on the SMB port? It is possible to
> get this behaviour by blocking the wrong thing at least with the Linux
> firewall, so that would be the first place I'd check.
Port 139 is specifically set to "accept" for both TCP and UDP in my iptables config, and nmap yields the following with the firewall running:
PORT STATE SERVICE
139/tcp open netbios-ssn
Is there another port I need to open? 139 is the only one of which I'm aware.
>> my_name_register_failed: Failed to register my name BOOTHOST-1230<20>
>> on subnet UNICAST_SUBNET. [2005/12/05 15:23:21, 0]
>> standard_fail_register: Failed to register/refresh name
> Out of curiosity, does it still do this if the name is <= 8 chars?
No, it does not; it's able to register a new NetBIOS name ok. Changing the NetBIOS name to BH1230 still yields a smbclient timeout though:
boothost:/opt/samba/var# smbclient -L BH1230 -Uvalidusr
added interface ip=172.21.23.1 bcast=172.21.23.255 nmask=255.255.255.0
Got a positive name query response from 172.16.102.41 ( 172.21.23.1 )
session setup failed: Call timed out: server did not respond after 20000 milliseconds
Something else I found over the weekend: my original NetBIOS name has the wrong IP address listed in the PDC's wins.dat:
"BOOTHOST-1230#00" 1134682795 172.16.104.136 44R
"BOOTHOST-1230#03" 1134682795 172.16.104.136 44R
"BOOTHOST-1230#20" 1134682795 172.16.104.136 44R
wins.dat should list the IP address for this host as 172.21.23.1.
I've changed the NetBIOS name of the machine at the incorrect address and rejoined the domain, and then rejoined the domain with the machine at the appropriate IP address; unfortunately, wins.dat on the PDC still lists the wrong IP address for all three "BOOTHOST-1230" entries. Is there any way I can force these incorrect entries out of wins.dat WITHOUT restarting samba on the PDC?
More information about the samba