Bug 36459 - installer / system setup module sets windows/domain without checking for netbios restrictions
installer / system setup module sets windows/domain without checking for netb...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: System setup
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0
Assigned To: Arvid Requate
Felix Botner
: interim-4
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-05 18:06 CET by Arvid Requate
Modified: 2018-08-07 10:22 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2014-11-05 18:06:56 CET
Feedback from a beta tester of UCS 4.0 RC3 indicates that the installer / system setup module sets windows/domain (my guess) without checking that it is a valid netbios name:

As far as I know the tester installed a DC master with "AD compatible domaincontroller" and used "Stephan & Ben GmbH und Co. KG" as organization name.


In the end the univention-samba4 joinscript failed with this traceback:
==========================================================================
ERROR(<class 'samba.provision.InvalidNetbiosName'>): uncaught exception - The name ''STEPHAN-BEN-GMBH-UND-CO-KG'' is not a valid NetBIOS name
File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 175, in _run
return self.run(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/samba/netcmd/domain.py", line 434, in run
nosync=ldap_backend_nosync, ldap_dryrun_mode=ldap_dryrun_mode)
File "/usr/lib/python2.7/dist-packages/samba/provision/__init__.py", line 2022, in provision
sitename=sitename, rootdn=rootdn, domain_names_forced=(samdb_fill == FILL_DRS))
File "/usr/lib/python2.7/dist-packages/samba/provision/__init__.py", line 631, in guess_names
raise InvalidNetbiosName(domain)
Samba4 provision failed, exiting /usr/share/univention-samba4/scripts/setup-s4.sh
EXITCODE=1
==========================================================================
Comment 1 Arvid Requate univentionstaff 2014-11-05 20:37:54 CET
The windows/domain is now automatically truncated to 15 chracters max.

My short excursion into the world of javascript/dojo has not been rewarded with any change of behaviour of the web interface. Basically it doesn't set and send vals['windows/domain'] to the backend verification method. I guess this also wouldn't help for customers that have an existing domain with a custom wndows/domain name which doesn't derive from the domainname in the usual way.
Enforcing the 15 chracters is the required step here, so I'll leave it at that for now.

Changelog adjusted.
Comment 2 Alexander Kläser univentionstaff 2014-11-06 10:56:15 CET
(In reply to Arvid Requate from comment #1)
> The windows/domain is now automatically truncated to 15 chracters max.
> 
> My short excursion into the world of javascript/dojo has not been rewarded
> with any change of behaviour of the web interface. Basically it doesn't set
> and send vals['windows/domain'] to the backend verification method. I guess
> this also wouldn't help for customers that have an existing domain with a
> custom wndows/domain name which doesn't derive from the domainname in the
> usual way.
> Enforcing the 15 chracters is the required step here, so I'll leave it at
> that for now.

:) … the netbios name is automatically set via the backend. Could this lead to problems in cases when you would like to join directly into AD or so? You have then no real control over the netbios name, in case you would need to adapt it to your setup.
Comment 3 Arvid Requate univentionstaff 2014-11-06 13:48:40 CET
> You have then no real control over the netbios name,
> in case you would need to adapt it to your setup.

Exactly, this is a gui issue. In earlier incarnations of system setup we provided an input field for this. The Samba issue here is that the join fails if the netbios name is too long. My patch ensures that this cannot happen any longer.

To improve user experience I'd like to fix the missing validation. The backend code for this is there, only the frontend js code doesn't pass the value. If you could provide support as to how to get this implemented, that would be great.
Comment 4 Felix Botner univentionstaff 2014-11-10 12:45:49 CET
OK - installation, windows/domain is limited to 15 chracters
OK - appliance mode, windows/domain is limited to 15 chracters


OK - Changelog (fixed bug number)
Comment 5 Stefan Gohmann univentionstaff 2014-11-26 06:54:48 CET
UCS 4.0-0 has been released:
 http://docs.univention.de/release-notes-4.0-0-en.html
 http://docs.univention.de/release-notes-4.0-0-de.html

If this error occurs again, please use "Clone This Bug".