Univention Bugzilla – Bug 35032
UMC wizard suggests invalid hostnames
Last modified: 2014-08-27 17:01:37 CEST
As far as I understood hostnames with special characters like "-" are invalid. That's why the UMC Import Wizard does not allow to create new school-ou's with such characters in the hostname (or ou). With create_ou at the commandline new hostnames are creates with "-" per default if you don't specify the hostname: ... for dc in school_dcs.split (): if dcName: dccn = dcName else: if configRegistry.is_true('ucsschool/singlemaster', False): dccn = configRegistry.get('hostname') else: dccn = 'dc%s-01' % schoolNr.lower () ...
According to http://support.microsoft.com/kb/909264/de, only "hyphen-minus" is ok and works for NETBIOS and DNS: """DNS-Computernamen dürfen nur alphabetische Zeichen (A-Z), numerische Zeichen (0-9), das Minuszeichen (-) und den Punkt (.) enthalten. Punkte sind nur zulässig, wenn sie dazu dienen, die Bestandteile von Domänennamen zu trennen.""" This implies that the OU wizard is wrong when asking for a slave hostname with possible underscore. ---[ucs-school-umc-wizards/umc/js/schoolwizards/SchoolWizard.js]--- }, { type: TextBox, name: 'dc_name', label: _('Name of educational school server'), regExp: '^\\w+(\\w|-)*$', description: _('Name of the educational domaincontroller slave for the new school. The server name may consist of the letters a-z, the digits 0-9 and underscores. The name of the educational server may not be equal to the administrative server!'), maxLength: 12, ---[cut]--- The widget regex seems to allow hyphens but no underscores → tooltip is wrong. The create_ou script uses the following function to check user specified hostnames: def is_valid_hostname(name): return bool(re.match('^[a-zA-Z](([a-zA-Z0-9-_]*)([a-zA-Z0-9]$))?$', name)) → underscores are allowed; I think this is ok, because underscores are allowed as NetBIOS names. Via Bug 35033 the manual should be updated to it suggest hyphens only.
ucs-school-umc-installer/umc/js/schoolinstaller.js: 1) The tooltip and the regex have been fixed (underscore → hyphen) - regExp: '^[a-zA-Z0-9](([a-zA-Z0-9_]*)([a-zA-Z0-9]$))?$', + regExp: '^[a-zA-Z0-9](([a-zA-Z0-9-]*)([a-zA-Z0-9]$))?$', ucs-school-umc-wizards/umc/js/schoolwizards/SchoolWizard.js: 1) The tooltip has been fixed (underscore → hyphen) 2) The regex has been replaced with the one from ucs-school-umc-installer. This way both regex are the same and dashes are no longer allowed at the end of hostnames: - regExp: '^\\w+(\\w|-)*$', + regExp: '^[a-zA-Z0-9](([a-zA-Z0-9-]*)([a-zA-Z0-9]$))?$', The packages ucs-school-umc-installer and ucs-school-umc-wizard have been rebuilt. The included translation files have been updated, too. Changelogentry to changelog-ucsschool-3.2R2v2.xml has been added.
Fix: OK, fixed "and hyphens" → "and hyphens (-)" in schoolinstaller Changelog: fixed typo
UCS@school 3.2 R2 v2 has been released: http://docs.univention.de/release-notes-ucsschool-3.2R2v2-de.html If this error occurs again, please use "Clone This Bug".