Public bug reported:

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 postinst, however, uses (for reasons unknown to me) "samba-
tool testparm", 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

** Affects: samba (Ubuntu)
     Importance: High
     Assignee: Andreas Hasenack (ahasenack)
         Status: In Progress

** Changed in: samba (Ubuntu)
     Assignee: (unassigned) => Andreas Hasenack (ahasenack)

** Changed in: samba (Ubuntu)
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to samba in Ubuntu.
https://bugs.launchpad.net/bugs/1864329

Title:
  too long netbios name shouldn't be a fatal error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1864329/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to