Bug 70980 - wins lookup broken
Summary: wins lookup broken
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: samba
Version: 7.3
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Trond Eivind Glomsrxd
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-08-07 15:54 UTC by bryan hunt
Modified: 2007-03-27 03:55 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-08-08 18:02:29 UTC
Embargoed:


Attachments (Terms of Use)

Description bryan hunt 2002-08-07 15:54:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Description of problem:
Samba client programs are not able to do a lookup against a wins server, they 
try three times and then revert to broadcast. This means
that lookups can only be performed on the local subnet

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Hello All,
I am on a network. It has an address of 192.168.2.0. It has a master browser
192.168.2.128 which is running a wins server on port 137. 
I have confirmed this by running nmap against the server and it is running
ok.  

If I run the following command :::  smbclient  -d10 -L huntb -U huntb -N,  I
get the output shown below. 
Notice the way it tries 3 times to send the request to the wins server ...
it then gives up and eventually does name 
resolution via broadcast to the 192.168.2.255 address.  

Even if I set the box up as a wins server and it is querying itself it will
produce the same result. 

	

Actual Results:  added interface ip=192.168.2.112 bcast=192.168.2.255 
nmask=255.255.255.0
Client started (version 2.0.10).
resolve_wins: Attempting wins lookup for name huntb<0x20>
bind succeeded on port 0
nmb packet from 192.168.2.128(137) header: id=10376 opcode=Query(0)
response=No
    header: flags: bcast=No rec_avail=No rec_des=Yes trunc=No auth=No
    header: rcode=0 qdcount=1 ancount=0 nscount=0 arcount=0
    question: q_name=HUNTB<20> q_type=32 q_class=1
Sending a packet of len 50 to (192.168.2.128) on port 137
nmb packet from 192.168.2.128(137) header: id=10376 opcode=Query(0)
response=No
    header: flags: bcast=No rec_avail=No rec_des=Yes trunc=No auth=No
    header: rcode=0 qdcount=1 ancount=0 nscount=0 arcount=0
    question: q_name=HUNTB<20> q_type=32 q_class=1
Sending a packet of len 50 to (192.168.2.128) on port 137
nmb packet from 192.168.2.128(137) header: id=10376 opcode=Query(0)
response=No
    header: flags: bcast=No rec_avail=No rec_des=Yes trunc=No auth=No
    header: rcode=0 qdcount=1 ancount=0 nscount=0 arcount=0
    question: q_name=HUNTB<20> q_type=32 q_class=1
Sending a packet of len 50 to (192.168.2.128) on port 137


resolve_hosts: Attempting host lookup for name huntb<0x20>
resolve_lmhosts: Attempting lmhosts lookup for name huntb<0x20>
getlmhostsent: lmhost entry: 127.0.0.1 localhost 
resolve_bcast: Attempting broadcast lookup for name huntb<0x20>
bind succeeded on port 0
nmb packet from 192.168.2.255(137) header: id=10377 opcode=Query(0)
response=No
    header: flags: bcast=Yes rec_avail=No rec_des=Yes trunc=No auth=No
    header: rcode=0 qdcount=1 ancount=0 nscount=0 arcount=0
    question: q_name=HUNTB<20> q_type=32 q_class=1
Sending a packet of len 50 to (192.168.2.255) on port 137
read_udp_socket: lastip 192.168.2.111 lastport 137 read: 62
parse_nmb: packet id = 10377
Received a packet of len 62 from (192.168.2.111) port 137
nmb packet from 192.168.2.111(137) header: id=10377 opcode=Query(0)
response=Yes
    header: flags: bcast=No rec_avail=No rec_des=Yes trunc=No auth=Yes
    header: rcode=0 qdcount=0 ancount=1 nscount=0 arcount=0
    answers: nmb_name=HUNTB<20> rr_type=32 rr_class=1 ttl=300000
    answers   0 char `....o   hex 6000C0A8026F
Got a positive name query response from 192.168.2.111 ( 192.168.2.111 )
Connecting to 192.168.2.111 at port 139
write_socket(3,76)
write_socket(3,76) wrote 76
Sent session request
got smb length of 0
size=0
smb_com=0x0
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=0
smb_flg2=0
smb_tid=0
smb_pid=0
smb_uid=0
smb_mid=0
smt_wct=0
smb_bcc=0
 session request ok
write_socket(3,168)
write_socket(3,168) wrote 168
got smb length of 101
size=101
smb_com=0x72
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=1
smb_tid=0
smb_pid=5572
smb_uid=0
smb_mid=1
smt_wct=17
smb_vwv[0]=7 (0x7)
smb_vwv[1]=2563 (0xA03)
smb_vwv[2]=256 (0x100)
smb_vwv[3]=1024 (0x400)
smb_vwv[4]=17 (0x11)
smb_vwv[5]=0 (0x0)
smb_vwv[6]=256 (0x100)
smb_vwv[7]=0 (0x0)
smb_vwv[8]=0 (0x0)
smb_vwv[9]=64768 (0xFD00)
smb_vwv[10]=227 (0xE3)
smb_vwv[11]=53248 (0xD000)
smb_vwv[12]=41512 (0xA228)
smb_vwv[13]=7598 (0x1DAE)
smb_vwv[14]=49726 (0xC23E)
smb_vwv[15]=50177 (0xC401)
smb_vwv[16]=2303 (0x8FF)
smb_bcc=32
[000] D9 31 F8 42 81 77 D9 74  45 00 4D 00 55 00 53 00  .1.B.w.t E.M.U.S.
[010] 45 00 00 00 48 00 55 00  4E 00 54 00 42 00 00 00  E...H.U. N.T.B...
size=101
smb_com=0x72
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=1
smb_tid=0
smb_pid=5572
smb_uid=0
smb_mid=1
smt_wct=17
smb_vwv[0]=7 (0x7)
smb_vwv[1]=2563 (0xA03)
smb_vwv[2]=256 (0x100)
smb_vwv[3]=1024 (0x400)
smb_vwv[4]=17 (0x11)
smb_vwv[5]=0 (0x0)
smb_vwv[6]=256 (0x100)
smb_vwv[7]=0 (0x0)
smb_vwv[8]=0 (0x0)
smb_vwv[9]=64768 (0xFD00)
smb_vwv[10]=227 (0xE3)
smb_vwv[11]=53248 (0xD000)
smb_vwv[12]=41512 (0xA228)
smb_vwv[13]=7598 (0x1DAE)
smb_vwv[14]=49726 (0xC23E)
smb_vwv[15]=50177 (0xC401)
smb_vwv[16]=2303 (0x8FF)
smb_bcc=32
[000] D9 31 F8 42 81 77 D9 74  45 00 4D 00 55 00 53 00  .1.B.w.t E.M.U.S.
[010] 45 00 00 00 48 00 55 00  4E 00 54 00 42 00 00 00  E...H.U. N.T.B...
write_socket(3,88)
write_socket(3,88) wrote 88
got smb length of 35
size=35
smb_com=0x73
smb_rcls=1
smb_reh=0
smb_err=5
smb_flg=136
smb_flg2=1
smb_tid=0
smb_pid=5572
smb_uid=0
smb_mid=1
smt_wct=0
smb_bcc=0
size=35
smb_com=0x73
smb_rcls=1
smb_reh=0
smb_err=5
smb_flg=136
smb_flg2=1
smb_tid=0
smb_pid=5572
smb_uid=0
smb_mid=1
smt_wct=0
smb_bcc=0
write_socket(3,83)
write_socket(3,83) wrote 83
got smb length of 84
size=84
smb_com=0x73
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=1
smb_tid=0
smb_pid=5572
smb_uid=2048
smb_mid=1
smt_wct=3
smb_vwv[0]=255 (0xFF)
smb_vwv[1]=84 (0x54)
smb_vwv[2]=0 (0x0)
smb_bcc=43
[000] 57 69 6E 64 6F 77 73 20  35 2E 30 00 57 69 6E 64  Windows  5.0.Wind
[010] 6F 77 73 20 32 30 30 30  20 4C 41 4E 20 4D 61 6E  ows 2000  LAN Man
[020] 61 67 65 72 00 45 4D 55  53 45 00                 ager.EMU SE.
size=84
smb_com=0x73
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=1
smb_tid=0
smb_pid=5572
smb_uid=2048
smb_mid=1
smt_wct=3
smb_vwv[0]=255 (0xFF)
smb_vwv[1]=84 (0x54)
smb_vwv[2]=0 (0x0)
smb_bcc=43
[000] 57 69 6E 64 6F 77 73 20  35 2E 30 00 57 69 6E 64  Windows  5.0.Wind
[010] 6F 77 73 20 32 30 30 30  20 4C 41 4E 20 4D 61 6E  ows 2000  LAN Man
[020] 61 67 65 72 00 45 4D 55  53 45 00                 ager.EMU SE.
Anonymous login successful
Domain=[EMUSE] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
 session setup ok
write_socket(3,67)
write_socket(3,67) wrote 67
got smb length of 46
size=46
smb_com=0x75
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=1
smb_tid=2048
smb_pid=5572
smb_uid=2048
smb_mid=1
smt_wct=3
smb_vwv[0]=255 (0xFF)
smb_vwv[1]=46 (0x2E)
smb_vwv[2]=1 (0x1)
smb_bcc=5
[000] 49 50 43 00 00                                    IPC.. 
 tconx ok

 Sharename      Type      Comment
 ---------      ----      -------
size=95
smb_com=0x25
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=8
smb_flg2=1
smb_tid=2048
smb_pid=5572
smb_uid=2048
smb_mid=1
smt_wct=14
smb_vwv[0]=19 (0x13)
smb_vwv[1]=0 (0x0)
smb_vwv[2]=1024 (0x400)
smb_vwv[3]=65504 (0xFFE0)
smb_vwv[4]=0 (0x0)
smb_vwv[5]=0 (0x0)
smb_vwv[6]=0 (0x0)
smb_vwv[7]=0 (0x0)
smb_vwv[8]=0 (0x0)
smb_vwv[9]=19 (0x13)
smb_vwv[10]=76 (0x4C)
smb_vwv[11]=0 (0x0)
smb_vwv[12]=95 (0x5F)
smb_vwv[13]=0 (0x0)
smb_bcc=32
[000] 5C 50 49 50 45 5C 4C 41  4E 4D 41 4E 00 00 00 57  \PIPE\LA NMAN...W
[010] 72 4C 65 68 00 42 31 33  42 57 7A 00 01 00 E0 FF  rLeh.B13 BWz.....
write_socket(3,99)
write_socket(3,99) wrote 99
got smb length of 35
size=35
smb_com=0x25
smb_rcls=1
smb_reh=0
smb_err=5
smb_flg=136
smb_flg2=1
smb_tid=2048
smb_pid=5572
smb_uid=2048
smb_mid=1
smt_wct=0
smb_bcc=0
size=35
smb_com=0x25
smb_rcls=1
smb_reh=0
smb_err=5
smb_flg=136
smb_flg2=1
smb_tid=2048
smb_pid=5572
smb_uid=2048
smb_mid=1
smt_wct=0
smb_bcc=0
NetShareEnum failed
Error returning browse list: ERRDOS - ERRnoaccess (Access denied.)

 Server               Comment
 ---------            -------
size=108
smb_com=0x25
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=8
smb_flg2=1
smb_tid=2048
smb_pid=5572
smb_uid=2048
smb_mid=1
smt_wct=14
smb_vwv[0]=32 (0x20)
smb_vwv[1]=0 (0x0)
smb_vwv[2]=8 (0x8)
smb_vwv[3]=65535 (0xFFFF)
smb_vwv[4]=0 (0x0)
smb_vwv[5]=0 (0x0)
smb_vwv[6]=0 (0x0)
smb_vwv[7]=0 (0x0)
smb_vwv[8]=0 (0x0)
smb_vwv[9]=32 (0x20)
smb_vwv[10]=76 (0x4C)
smb_vwv[11]=0 (0x0)
smb_vwv[12]=108 (0x6C)
smb_vwv[13]=0 (0x0)
smb_bcc=45
[000] 5C 50 49 50 45 5C 4C 41  4E 4D 41 4E 00 68 00 57  \PIPE\LA NMAN.h.W
[010] 72 4C 65 68 44 7A 00 42  31 36 42 42 44 7A 00 01  rLehDz.B 16BBDz..
[020] 00 FF FF FF FF FF FF 45  4D 55 53 45 00           .......E MUSE.
write_socket(3,112)
write_socket(3,112) wrote 112
got smb length of 64
size=64
smb_com=0x25
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=1
smb_tid=2048
smb_pid=5572
smb_uid=2048
smb_mid=1
smt_wct=10
smb_vwv[0]=8 (0x8)
smb_vwv[1]=0 (0x0)
smb_vwv[2]=0 (0x0)
smb_vwv[3]=8 (0x8)
smb_vwv[4]=56 (0x38)
smb_vwv[5]=0 (0x0)
smb_vwv[6]=0 (0x0)
smb_vwv[7]=64 (0x40)
smb_vwv[8]=0 (0x0)
smb_vwv[9]=0 (0x0)
smb_bcc=9
[000] 00 47 00 00 00 00 00 00  00                       .G...... .
size=64
smb_com=0x25
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=1
smb_tid=2048
smb_pid=5572
smb_uid=2048
smb_mid=1
smt_wct=10
smb_vwv[0]=8 (0x8)
smb_vwv[1]=0 (0x0)
smb_vwv[2]=0 (0x0)
smb_vwv[3]=8 (0x8)
smb_vwv[4]=56 (0x38)
smb_vwv[5]=0 (0x0)
smb_vwv[6]=0 (0x0)
smb_vwv[7]=64 (0x40)
smb_vwv[8]=0 (0x0)
smb_vwv[9]=0 (0x0)
smb_bcc=9
[000] 00 47 00 00 00 00 00 00  00                       .G...... .
Realloc asked for 0 bytes

 Workgroup            Master
 ---------            -------
size=108
smb_com=0x25
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=8
smb_flg2=1
smb_tid=2048
smb_pid=5572
smb_uid=2048
smb_mid=1
smt_wct=14
smb_vwv[0]=32 (0x20)
smb_vwv[1]=0 (0x0)
smb_vwv[2]=8 (0x8)
smb_vwv[3]=65535 (0xFFFF)
smb_vwv[4]=0 (0x0)
smb_vwv[5]=0 (0x0)
smb_vwv[6]=0 (0x0)
smb_vwv[7]=0 (0x0)
smb_vwv[8]=0 (0x0)
smb_vwv[9]=32 (0x20)
smb_vwv[10]=76 (0x4C)
smb_vwv[11]=0 (0x0)
smb_vwv[12]=108 (0x6C)
smb_vwv[13]=0 (0x0)
smb_bcc=45
[000] 5C 50 49 50 45 5C 4C 41  4E 4D 41 4E 00 68 00 57  \PIPE\LA NMAN.h.W
[010] 72 4C 65 68 44 7A 00 42  31 36 42 42 44 7A 00 01  rLehDz.B 16BBDz..
[020] 00 FF FF 00 00 00 80 45  4D 55 53 45 00           .......E MUSE.
write_socket(3,112)
write_socket(3,112) wrote 112
got smb length of 64
size=64
smb_com=0x25
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=1
smb_tid=2048
smb_pid=5572
smb_uid=2048
smb_mid=1
smt_wct=10
smb_vwv[0]=8 (0x8)
smb_vwv[1]=0 (0x0)
smb_vwv[2]=0 (0x0)
smb_vwv[3]=8 (0x8)
smb_vwv[4]=56 (0x38)
smb_vwv[5]=0 (0x0)
smb_vwv[6]=0 (0x0)
smb_vwv[7]=64 (0x40)
smb_vwv[8]=0 (0x0)
smb_vwv[9]=0 (0x0)
smb_bcc=9
[000] 00 47 00 00 00 00 00 00  00                       .G...... .
size=64
smb_com=0x25
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=1
smb_tid=2048
smb_pid=5572
smb_uid=2048
smb_mid=1
smt_wct=10
smb_vwv[0]=8 (0x8)
smb_vwv[1]=0 (0x0)
smb_vwv[2]=0 (0x0)
smb_vwv[3]=8 (0x8)
smb_vwv[4]=56 (0x38)
smb_vwv[5]=0 (0x0)
smb_vwv[6]=0 (0x0)
smb_vwv[7]=64 (0x40)
smb_vwv[8]=0 (0x0)
smb_vwv[9]=0 (0x0)
smb_bcc=9
[000] 00 47 00 00 00 00 00 00  00                       .G...... .
Realloc asked for 0 bytes

Expected Results:  it should have resolved the hostname to the ip address using 
wins 

Additional info:

Comment 1 Trond Eivind Glomsrxd 2002-08-08 18:02:24 UTC
Can you give the version at http://people.redhat.com/teg/samba/ a try?

Comment 2 bryan hunt 2002-08-09 15:02:59 UTC
Teg, I have downloaded your version of samba. However I have also discovered that
my windoze sysadmin gave me incorrect info about the wins servers ip address. It
is actually on a different subnet, I have entered the correct address into the
samba conf file and everything is working excellently now, particularly name
resolution using nss_wins. 

Thanks for your time
Bryan



Note You need to log in before you can comment on or make changes to this bug.