too long netbios name shouldn't be a fatal error

Bug #1864329 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Triaged
Low
Unassigned

Bug Description

The container I'm using to test the fix for https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1864324 has a somewhat long hostname:

$ hostname -f
focal-bind9-upgrade-test.lxd

Samba by default will try to use the host part as its netbios name. Such names have a length limit, which is a bit short.

When using testparm, this is flagged:
$ testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
WARNING: The 'netbios name' is too long (max. 15 chars).
...

But is not a fatal error.

The samba-common-bin postinst, however, uses "samba-tool testparm" when the "server role" is "active directory domain controller", and that has a different behavior:

$ samba-tool testparm
INFO 2020-02-22 21:16:42,905 pid:37370 /usr/lib/python3/dist-packages/samba/netcmd/testparm.py #96: Loaded smb config files from /etc/samba/smb.conf
INFO 2020-02-22 21:16:42,905 pid:37370 /usr/lib/python3/dist-packages/samba/netcmd/testparm.py #97: Loaded services file OK.
ERROR 2020-02-22 21:16:42,905 pid:37370 /usr/lib/python3/dist-packages/samba/netcmd/testparm.py #124: netbios name FOCAL-BIND9-UPGRADE-TEST is not a valid netbios name
Press enter to see a dump of your service definitions
(...)
ERROR: Invalid smb.conf
$ echo $?
255

This fails the package installation.
Setting up samba-common-bin (2:4.11.5+dfsg-1ubuntu2~ppa1) ...
Checking smb.conf with samba-tool
INFO 2020-02-22 21:11:22,932 pid:36820 /usr/lib/python3/dist-packages/samba/netcmd/testparm.py #96: Loaded smb config files from /etc/samba/smb.conf
INFO 2020-02-22 21:11:22,933 pid:36820 /usr/lib/python3/dist-packages/samba/netcmd/testparm.py #97: Loaded services file OK.
ERROR 2020-02-22 21:11:22,933 pid:36820 /usr/lib/python3/dist-packages/samba/netcmd/testparm.py #124: netbios name FOCAL-BIND9-UPGRADE-TEST is not a valid netbios name
ERROR: Invalid smb.conf
dpkg: error processing package samba-common-bin (--configure):
 installed samba-common-bin package post-installation script subprocess returned error exit status 255

Unless it's absolutely critical that in an AD role the netbios name be 15 characters long max, this should just be a warning instead of a fatal error.

Changed in samba (Ubuntu):
assignee: nobody → Andreas Hasenack (ahasenack)
status: New → In Progress
description: updated
Changed in samba (Ubuntu):
assignee: Andreas Hasenack (ahasenack) → nobody
status: In Progress → Triaged
importance: High → Low
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.