[Bug 1864329] Re: too long netbios name shouldn't be a fatal error
Andreas Hasenack
andreas at canonical.com
Sun Feb 23 13:58:01 UTC 2020
** Description changed:
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
+ $ 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:
+ 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
+ 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.
--
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
More information about the Ubuntu-server-bugs
mailing list