netbios name truncating doesn't work

Bug #1505590 reported by Sebastien Bacher
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
samba
Unknown
Unknown
samba (Ubuntu)
Fix Released
High
Unassigned
Trusty
Fix Released
High
Unassigned

Bug Description

[Impact]

* Netbios name truncating doesn't work.

* Which leads to empty machine names. It's fixed in the current version but
  we should SRU the fix.

[Test Case]

- install samba
- edit smb.conf and set 'netbios name = XABCDEFGHIJKLMNOPQRSTUVWXYZ'
- start nmbd
- look what is the "Samba name server" in the log

[Regression Potential]

* Check that machine names are correct.

Changed in samba (Ubuntu):
importance: Undecided → High
status: New → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Sebastien, or anyone else affected,

Accepted samba into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/samba/2:4.1.6+dfsg-1ubuntu2.14.04.10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in samba (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Mathew Hodson (mhodson)
Changed in samba (Ubuntu Trusty):
importance: Undecided → High
Mathew Hodson (mhodson)
description: updated
tags: added: trusty
Revision history for this message
Sebastien Bacher (seb128) wrote :

seems like that doesn't work as it should, the truncating warning is not there anymore but the name is still empty...

tags: added: verification-failed
removed: verification-needed
Revision history for this message
Mathew Hodson (mhodson) wrote :

This SRU has been shadowed by a security update and needs to be re-merged.

Changed in samba (Ubuntu Trusty):
status: Fix Committed → Triaged
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I believe this is working correctly in the current version in trusty: 2:4.3.11+dfsg-0ubuntu0.14.04.12

- testparm warns about it:

# testparm -s
Load smb config files from /etc/samba/smb.conf
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
WARNING: The 'netbios name' is too long (max. 15 chars).

Server role: ROLE_STANDALONE

# Global parameters
[global]
 netbios name = XABCDEFGHIJKLMNOPQRSTUVWXYZ

- nmblookup shows the truncated name:

root@trusty-samba-netbios-truncate-1505590:~# nmblookup '*'
10.0.100.204 *<00>
root@trusty-samba-netbios-truncate-1505590:~# nmblookup -A 10.0.100.204
Looking up status of 10.0.100.204
 WORKGROUP <00> - <GROUP> B <ACTIVE>
 WORKGROUP <1e> - <GROUP> B <ACTIVE>
 XABCDEFGHIJKLMN <00> - B <ACTIVE>
 XABCDEFGHIJKLMN <03> - B <ACTIVE>
 XABCDEFGHIJKLMN <20> - B <ACTIVE>

 MAC Address = 00-00-00-00-00-00

- smbclient -L shows it as well, truncated:
root@trusty-samba-netbios-truncate-1505590:~# smbclient -L localhost -N
WARNING: The "syslog" option is deprecated
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.3.11-Ubuntu]

 Sharename Type Comment
 --------- ---- -------
 print$ Disk Printer Drivers
 IPC$ IPC IPC Service (trusty-samba-netbios-truncate-1505590 server (Samba, Ubuntu))
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.3.11-Ubuntu]

 Server Comment
 --------- -------
 XABCDEFGHIJKLMN trusty-samba-netbios-truncate-1505590 server (Sa

 Workgroup Master
 --------- -------
 WORKGROUP

- %m expands to the whole thing:
# l /var/log/samba/log.xabcdefghijklmnopqrstuvwxyz
-rw-r--r-- 1 root root 0 Sep 28 14:25 /var/log/samba/log.xabcdefghijklmnopqrstuvwxyz

- nmbd logs errors, but using the whole name, not an empty string:
[2017/09/28 14:29:05.387607, 0] ../source3/nmbd/nmbd_become_lmb.c:533(become_local_master_browser)
  become_local_master_browser: Error - cannot find server XABCDEFGHIJKLMNOPQRSTUVWXYZ in workgroup WORKGROUP on subnet 10.0.100.204

artful which has samba 4.6.7 behaves mostly the same, it just doesn't list the server under the "Server" header in the smbclient -L output.

Given all the above, I'll mark this bug as fix released in trusty. If there is evidence to the contrary, please reopen it and comment.

Thanks!

Changed in samba (Ubuntu Trusty):
status: Triaged → Fix Released
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.