Truncating NetBIOS name don't work

Bug #376359 reported by Юрий Чудновский
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Binary package hint: samba

[2009/05/14 08:23:22, 0] nmbd/nmbd_nameregister.c:register_name(483)
  register_name: NetBIOS name VSERVER-TERMINAL is too long. Truncating to VSERVER-TERMINA

But, VSERVER-TERMINA did not seen in network, works only by IP address.
Manual renaming hostname, for example, to v-terminal and restarting samba solves a problem - computer reveals in net.
But it is still bug, I just not sure - it is really a bug of nmbd or some other samba part.

Tech info:
Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty
Linux v-terminal 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux
nmbd version 3.3.2
samba version: 2:3.3.2-1ubuntu3

Revision history for this message
Thierry Carrez (ttx) wrote :

I think it's a hostname resolution issue on the client side, due to mismatch between DNS hostname and NetBIOS name. Could you run:
smbclient -d 4 -N -L //servername
on the client in both cases and post the corresponding output ?

Changed in samba (Ubuntu):
status: New → Incomplete
Revision history for this message
Юрий Чудновский (fqc) wrote :

Here You are.
First, I changed hostname to vserver-terminal, restart samba and puts output to file VSERVER-TERMINA.txt, then changed back to v-terminal, again restart samba and puts output to file V-TERMINAL.txt.
Attaching files.

Revision history for this message
Юрий Чудновский (fqc) wrote :
Revision history for this message
Юрий Чудновский (fqc) wrote :

Attaching same files from remote client

Revision history for this message
Юрий Чудновский (fqc) wrote :
Revision history for this message
Thierry Carrez (ttx) wrote :

The trace remote-VSERVER-TERMINAL.txt looks successful to me... What do you mean by "but, VSERVER-TERMINA did not seen in network" ?

In all cases the problem would be in your host resolution. Your hostname is VSERVER-TERMINAL and the NetBIOS name (limited to 16 char) is VSERVER-TERMINA. If you don't setup hosts/lmhosts/WINS or DNS resolution to resolve VSERVER-TERMINA[L] to IP, it will use SMB broadcast (and only answer to the shortened NetBIOS name).

Revision history for this message
Юрий Чудновский (fqc) wrote :

I mean, VSERVER-TERMINA did not seen in Windows or Linux network neighborhood windows. Tomorrow I'll boot computers with long terminal name and get some look into problem (windows don't react immediately to computer name change).

Revision history for this message
Юрий Чудновский (fqc) wrote :
Download full text (7.0 KiB)

Here it is. Attach: screenshot, there is no "VSERVER-TERMINA" in list.
Even more,
frank@vserver-terminal:~$ smbtree -SN
session request to 192.168.1.45 failed (Called name not present)
session request to 192.168.1.45 failed (Called name not present)
GREENGROUP
session request to 192.168.1.45 failed (Called name not present)
 \\VSERVER-SLAVE vserver-slave (secondary backup storage)
 \\VSERVER-MASTER vserver-master (primary backup storage)
 \\TRANSP
 \\PTO1
 \\PTO
 \\PRIEMNAYA
 \\PEV2
 \\PEV1
 \\OHRANATRUDA
 \\NPTO
 \\NPEV
 \\MASTERA
 \\KASSA
 \\GBUGH
 \\BUGH4
 \\BUGH3
 \\BUGH2
 \\BUGH1

Here too.
Repeating smbclient query.

frank@vserver-terminal:~$ smbclient -d 4 -N -L //VSERVER-TERMINA
lp_load_ex: refreshing parameters
Initialising global parameters
params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf"
Processing section "[global]"
doing parameter workgroup = GREENGROUP
doing parameter server string = %h server (Samba, Ubuntu LTSP)
doing parameter dns proxy = no
doing parameter log file = /var/log/samba/log.%m
doing parameter max log size = 1000
doing parameter syslog = 0
doing parameter panic action = /usr/share/samba/panic-action %d
doing parameter encrypt passwords = true
doing parameter passdb backend = tdbsam
doing parameter obey pam restrictions = yes
doing parameter unix password sync = yes
doing parameter passwd program = /usr/bin/passwd %u
doing parameter passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
doing parameter pam password change = yes
doing parameter map to guest = bad user
doing parameter usershare allow guests = yes
pm_process() returned Yes
added interface eth0 ip=fe80::20c:29ff:fe53:13b3%eth0 bcast=fe80::ffff:ffff:ffff:ffff%eth0 netmask=ffff:ffff:ffff:ffff::
added interface eth0 ip=192.168.1.252 bcast=192.168.1.255 netmask=255.255.255.0
Client started (version 3.3.2).
tdb(unnamed): tdb_open_ex: could not open file /var/run/samba/gencache.tdb: Permission denied
resolve_lmhosts: Attempting lmhosts lookup for name VSERVER-TERMINA<0x20>
startlmhosts: Can't open lmhosts file /etc/samba/lmhosts. Error was No such file or directory
resolve_wins: Attempting wins lookup for name VSERVER-TERMINA<0x20>
resolve_wins: WINS server resolution selected and no WINS servers listed.
resolve_hosts: Attempting host lookup for name VSERVER-TERMINA<0x20>
resolve_hosts: getaddrinfo failed for name VSERVER-TERMINA [No address associated with hostname]
name_resolve_bcast: Attempting broadcast lookup for name VSERVER-TERMINA<0x20>
nmb packet from 192.168.1.252(137) header: id=31809 opcode=Query(0) response=Yes
    header: flags: bcast=No rec_avail=Yes rec_des=Yes trunc=No auth=Yes
    header: rcode=0 qdcount=0 ancount=1 nscount=0 arcount=0
    answers: nmb_name=VSERVER-TERMINA<20> rr_type=32 rr_class=1 ttl=259200
    answers 0 char ...... hex 0000C0A801FC
Got a positive name query response from 192.168.1.252 ( 192.168.1.252 )
Connecting to 192.168.1.252 at port 445
 session requ...

Read more...

Revision history for this message
Thierry Carrez (ttx) wrote :

So there seem to be an incompatibility between the way Windows (and smbtree) browse the "Windows network" and a Samba server where the DNS name and NetBIOS name differ.

Just to make sure, does adding "netbios name = VSERVER-TERM" to /etc/samba/smb.conf (while keeping your hostname to vserver-terminal) change anything ?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.