7.2. UDM syntax#

Every UDM property has a syntax, which is used to check the value for correctness. Univention Corporate Server already provides several syntax types, which are defined in the Python file /usr/lib/python3/dist-packages/univention/admin/syntax.py. The following syntax list is not complete. For a complete overview, consult the file directly.

string; string64; OneThirdString; HalfString; TwoThirdsString; FourThirdsString; OneAndAHalfString; FiveThirdsString; TextArea

Different string classes, which are mapped in Univention Management Console to text input widgets with different widths and heights.

string_numbers_letters_dots; string_numbers_letters_dots_spaces; IA5string; …

Different string classes with restrictions on the allowed character set.

Upload; Base64Upload; jpegPhoto

Binary data.


Positive integers.

boolean; booleanNone; TrueFalse; TrueFalseUpper; TrueFalseUp

Different boolean types which map to yes and no or true and false.

hostName; DNS_Name; windowsHostName; ipv4Address; ipAddress; hostOrIP; v4netmask; netmask; IPv4_AddressRange; IP_AddressRange; …

Different classes for host names or addresses.

unixTime; TimeString; iso8601Date; date

Date and time.

GroupDN; UserDN; UserID; HostDN; DomainController; Windows_Server; UCS_Server; …

Dynamic classes, which do an LDAP search to provide a list of selectable values like users, groups and hosts.

LDAP_Search, UDM_Objects, UDM_Attribute

These syntaxes do an LDAP search and display the result as a list. They are further described in UDM LDAP search.

Additional syntax classes can be added by placing a Python file in /usr/lib/python2.7/dist-packages/univention/admin/syntax.d/ and /usr/lib/python3/dist-packages/univention/admin/syntax.d/. They’re automatically imported by UDM.

7.2.1. UDM syntax override#

Sometimes the predefined syntax is inappropriate in some scenarios. This can be because of performance problems with LDAP searches or the need for more restrictive or lenient value checking. The latter case might require a change to the LDAP schema, since slapd also checks the provided values for correctness.

The syntax of UDM properties can be overwritten by using Univention Configuration Registry Variables. For each module and each property the variable directory/manager/web/modules/module/properties/property/syntax can be set to the name of a syntax class. For example directory/manager/web/modules/users/user/properties/username/syntax=uid would restrict the name of users to not contain umlauts.

Since UCR variables only affect the local system, the variables must be set on all systems were UDM is used. This can be either done through a Univention Configuration Registry policy or by setting the variable in the .postinst script of some package, which is installed on all hosts.