3.0.25pre2 and net lookup

Thomas Bork tombork at web.de
Tue Apr 3 16:30:37 GMT 2007


Gerald (Jerry) Carter wrote:

>> Do you know, why unexpected.tdb isn't created, if 
>> it not exists? I have to create unexpected.tdb at Samba
>> start time to avoid theses messages:
> IIRC the unexpected.tdb is managed by nmbd and is used to deal
> with clients that send netbios name query responses
> on port 137/udp rather than to the src port of the original
> query.
> So starting nmbd should be all you need.

nmbd *was* running:

deveis # /var/install/bin/samba-pdc-groupmapping -q addall
deveis # nmbd -D
deveis # smbd -D
deveis # ps ax | grep mbd
  1420 ?        Ss     0:00 nmbd -D
  1422 ?        Ss     0:00 smbd -D
  1423 ?        S      0:00 smbd -D
deveis # ls -l /var/lock/samba/unexpected.tdb
ls: /var/lock/samba/unexpected.tdb: No such file or directory
deveis # net lookup -d10 'tb3#00'
[...]
[2007/04/03 18:20:14, 5] libsmb/nmblib.c:send_udp(777)
   Sending a packet of len 50 to (127.255.255.255) on port 137
[2007/04/03 18:20:15, 2] lib/util_tdb.c:tdb_log(675)
   tdb(unnamed): tdb_open_ex: could not open file 
/var/lock/samba/unexpected.tdb: No such file or directory
[2007/04/03 18:20:15, 2] lib/util_tdb.c:tdb_log(675)
   tdb(unnamed): tdb_open_ex: could not open file 
/var/lock/samba/unexpected.tdb: No such file or directory
[2007/04/03 18:20:15, 2] lib/util_tdb.c:tdb_log(675)
   tdb(unnamed): tdb_open_ex: could not open file 
/var/lock/samba/unexpected.tdb: No such file or directory
[2007/04/03 18:20:15, 5] libsmb/nmblib.c:send_udp(777)
   Sending a packet of len 50 to (127.255.255.255) on port 137
[2007/04/03 18:20:15, 2] lib/util_tdb.c:tdb_log(675)
   tdb(unnamed): tdb_open_ex: could not open file 
/var/lock/samba/unexpected.tdb: No such file or directory
[2007/04/03 18:20:15, 2] lib/util_tdb.c:tdb_log(675)
   tdb(unnamed): tdb_open_ex: could not open file 
/var/lock/samba/unexpected.tdb: No such file or directory
[2007/04/03 18:20:15, 2] lib/util_tdb.c:tdb_log(675)
   tdb(unnamed): tdb_open_ex: could not open file 
/var/lock/samba/unexpected.tdb: No such file or directory
[2007/04/03 18:20:15, 5] libsmb/nmblib.c:send_udp(777)
   Sending a packet of len 50 to (127.255.255.255) on port 137
[2007/04/03 18:20:15, 2] lib/util_tdb.c:tdb_log(675)
   tdb(unnamed): tdb_open_ex: could not open file 
/var/lock/samba/unexpected.tdb: No such file or directory
[2007/04/03 18:20:15, 2] lib/util_tdb.c:tdb_log(675)
   tdb(unnamed): tdb_open_ex: could not open file 
/var/lock/samba/unexpected.tdb: No such file or directory
[2007/04/03 18:20:15, 2] lib/util_tdb.c:tdb_log(675)
   tdb(unnamed): tdb_open_ex: could not open file 
/var/lock/samba/unexpected.tdb: No such file or directory
[2007/04/03 18:20:15, 5] libsmb/nmblib.c:send_udp(777)
   Sending a packet of len 50 to (192.168.0.255) on port 137
[2007/04/03 18:20:15, 10] lib/util_sock.c:read_udp_socket(294)
   read_udp_socket: lastip 192.168.0.15 lastport 137 read: 62
[2007/04/03 18:20:15, 10] libsmb/nmblib.c:parse_nmb(506)
   parse_nmb: packet id = 24472
[2007/04/03 18:20:15, 5] libsmb/nmblib.c:read_packet(755)
   Received a packet of len 62 from (192.168.0.15) port 137
[2007/04/03 18:20:15, 4] libsmb/nmblib.c:debug_nmb_packet(112)
   nmb packet from 192.168.0.15(137) header: id=24472 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=TB3<00> rr_type=32 rr_class=1 ttl=300000
       answers   0 char ......   hex 0000C0A8000F
[2007/04/03 18:20:15, 2] libsmb/namequery.c:name_query(604)
   Got a positive name query response from 192.168.0.15 ( 192.168.0.15 )
[2007/04/03 18:20:15, 2] lib/util_tdb.c:tdb_log(675)
   tdb(unnamed): tdb_open_ex: could not open file 
/var/lock/samba/unexpected.tdb: No such file or directory
[2007/04/03 18:20:15, 2] lib/util_tdb.c:tdb_log(675)
   tdb(unnamed): tdb_open_ex: could not open file 
/var/lock/samba/unexpected.tdb: No such file or directory
[2007/04/03 18:20:16, 2] lib/util_tdb.c:tdb_log(675)
   tdb(unnamed): tdb_open_ex: could not open file 
/var/lock/samba/unexpected.tdb: No such file or directory
[2007/04/03 18:20:16, 10] libsmb/namequery.c:remove_duplicate_addrs2(435)
   remove_duplicate_addrs2: looking for duplicate address/port pairs
[2007/04/03 18:20:16, 5] libsmb/namecache.c:namecache_store(135)
   namecache_store: storing 1 address for tb3#00: 192.168.0.15:0
[2007/04/03 18:20:16, 10] lib/gencache.c:gencache_set(140)
   Adding cache entry with key = NBT/TB3#00; value = 192.168.0.15:0 and 
timeout = Tue Apr  3 18:31:16 2007
    (660 seconds ahead)
[2007/04/03 18:20:16, 10] libsmb/namequery.c:internal_resolve_name(1293)
   internal_resolve_name: returning 1 addresses: 192.168.0.15:0
[2007/04/03 18:20:16, 10] intl/lang_tdb.c:lang_tdb_init(138)
   lang_tdb_init: /usr/lib/samba/C.msg: No such file or directory
192.168.0.15
[2007/04/03 18:20:16, 2] utils/net.c:main(1032)
   return code = 0
deveis # ls -l /var/lock/samba/unexpected.tdb
ls: /var/lock/samba/unexpected.tdb: No such file or directory



If there is an cache entry for the name and the cache entry isn't 
timeout, then no packet is sent on port 137 and the error messages are 
not appearing:

[...]
[2007/04/03 18:19:21, 10] lib/gencache.c:gencache_get(226)
   Returning valid cache entry: key = NBT/TB3#00, value = 
192.168.0.15:0, timeout = Tue Apr  3 18:19:46 2007
[2007/04/03 18:19:21, 5] libsmb/namecache.c:namecache_fetch(214)
   name tb3#00 found.
[...]


der tom


More information about the samba-technical mailing list