libsmbclient and smb_opendir: problem with workgroup
Andreas
andreas at conectiva.com.br
Mon Jun 14 16:40:33 GMT 2004
On Mon, Jun 14, 2004 at 10:54:37AM -0500, Christopher R. Hertel wrote:
> Okay, that's weird.
>
> nmbd is obviously running and I assume that you can get to shares on the
> server, so smbd must be running...
No, I can't (not with a simple smbclient command, at least). That DUCKMAN
server is hosed somehow. But that's not the point.
> Try one more thing for me: 'nslookup DUCKMAN'
It resolves to duckman.distro.conectiva, which doesn't exist anymore (a side
effect of "search distro.conectiva conectiva" in /etc/resolv.conf). The
"duckman.distro.conectiva" name exist in DNS, but that IP is no longer used.
"duckman.conectiva", which is the domain I'm in (.conectiva), doesn't exist in
DNS. This machine was moved from the "distro.conectiva" domain to the ".conectiva"
domain but doesn't have the "duckman.conectiva" ip registered yet.
> I think I see the problem. I've just done some testing and I think I get
> three points for this one (if I'm right).
>
> Does the DNS entry match the NetBIOS lookup? Same IPs?
No
To try to circunvent this, I added an entry for duckman in /etc/samba/lmhosts.
But again, my problem is not with duckman in particular, I just saw some weird
behaviour with network browsing apps due to duckman which I think could mean
something else is broken.
> I was able to produce a similar problem at my end. Turns out that the DNS
> entry doesn't match. When I use nmblookup for the name "FOO" I get one
> IP, but when I do a DNS lookup I get a different IP.
Correct
> Try this as well: 'smbclient -R "bcast wins" -N -L DUCKMAN"'
Still doesn't work. The duckman machine is found allright, it just won't
answer (which, I stress again, is not my particular problem, but probably related
to why network browsing is hosed here if I'm on the MYGROUP group: the other groups
don't show up).
I'm still owing people a full packet trace, I'm working on that (trying to clean
out some noise such as cups announcements, dhcp and other stuff). But here is a snippet of the text
output part from tethereal regarding the above command (I now removed the duckman entry from lmhosts):
(10.0.2.177 is me, 10.0.4.149 is duckman)
1 0.000000 10.0.2.177 -> 10.0.4.149 TCP 43978 > 445 [SYN] Seq=0 Ack=0 Win=5840 Len=0 MSS=1460 TSV=1050967277 TSER=0 WS=0
2 0.000189 10.0.4.149 -> 10.0.2.177 TCP 445 > 43978 [RST, ACK] Seq=0 Ack=0 Win=0 Len=0
3 0.010709 10.0.2.177 -> 10.0.4.149 TCP 43979 > 139 [SYN] Seq=0 Ack=0 Win=5840 Len=0 MSS=1460 TSV=1050967288 TSER=0 WS=0
4 0.010865 10.0.4.149 -> 10.0.2.177 TCP 139 > 43979 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=4150813149 TSER=1050967288 WS=0
5 0.010879 10.0.2.177 -> 10.0.4.149 TCP 43979 > 139 [ACK] Seq=1 Ack=1 Win=5840 Len=0 TSV=1050967288 TSER=4150813149
6 0.021730 10.0.2.177 -> 10.0.4.149 NBSS Session request, to DUCKMAN<20> from PANDORA<00>
7 0.222636 10.0.2.177 -> 10.0.4.149 NBSS [TCP Retransmission] Session request, to DUCKMAN<20> from PANDORA<00>
8 0.624573 10.0.2.177 -> 10.0.4.149 NBSS [TCP Retransmission] Session request, to DUCKMAN<20> from PANDORA<00>
9 1.428451 10.0.2.177 -> 10.0.4.149 NBSS [TCP Retransmission] Session request, to DUCKMAN<20> from PANDORA<00>
10 3.036219 10.0.2.177 -> 10.0.4.149 NBSS [TCP Retransmission] Session request, to DUCKMAN<20> from PANDORA<00>
(...) (some noise)
later on:
31 20.040670 10.0.2.177 -> 10.0.4.149 NBSS Session request, to *SMBSERVER<20> from PANDORA<00>
32 20.241592 10.0.2.177 -> 10.0.4.149 NBSS [TCP Retransmission] Session request, to *SMBSERVER<20> from PANDORA<00>
33 20.643528 10.0.2.177 -> 10.0.4.149 NBSS [TCP Retransmission] Session request, to *SMBSERVER<20> from PANDORA<00>
34 21.447423 10.0.2.177 -> 10.0.4.149 NBSS [TCP Retransmission] Session request, to *SMBSERVER<20> from PANDORA<00>
I'll try a packet capture now of opendir("smb://") with workgroup=MYGROUP and workgroup=SOMEGARBAGE.
More information about the samba-technical
mailing list