UCS has always focused on centralizing and simplifying the administrative tasks related to the individual components of IT infrastructure. One of the many small tools that can simplify the life of administrators are the so-called user templates. In the following, I will describe how to create the necessary attributes to specify user templates, which for example will automatically create e-mail addresses for the users with their first name and last name in this always constant pattern. I will also show you which settings you need to make in order to apply these templates to different users in your UCS domain.
Setting Attributes – It’ s all done (semi-)automatically!
User templates can be used to specify certain attributes and settings when creating new user accounts. This is to say, all new users created with a template automatically receive the same attribute values or settings, e.g. a department number, the specification that the password must be changed at the first login or an e-mail address. With this you achieve two things:
- Consistency. It is ensured that all relevant attributes are set and nothing is forgotten.
- Time savings. You don’t have to configure each account individually.
The new app Self Service for example enables users to reset their password and edit their contact information themselves. In this article administrators learn how they can use the app to create new accounts without an initial password and also how to automatically send e-mail invitations to new users. Learn more
How to? – User Templates from the LDAP Directory
User templates are managed in the UMC module LDAP directory. There you have to move to the
univention container and then to the
templates sub-container. Here you can use the command “Add” with the object type “Settings: User Template” command to create a new user template:
After you have assigned a name to the user template, you can fill the required attributes with the appropriate values. In our example we create an e-mail address from first name and last name, set an organization name and define the primary group and the membership in another group called “wiki-access”. We also activate the option that the password must be changed at the first login – as shown in the screenshots:
The value for “Primary E-Mail Address” is generated dynamically using the following default:
As you can see, the first and last name are used for the e-mail address when creating a user account.
Dynamic replacements as described above are in principle possible for any values, but a syntactic or semantic check is not performed. If, for example, no first name is specified when creating the user, the above e-mail address would begin with a period and would therefore not be valid according to the e-mail standard.
Another possibility is the use of single characters or strings of attributes, e.g. with
<firstname>.<lastname>@future-inc.org an e-mail address is formed from the first letter of the first name as well as the complete last name. Please note: The character count starts at 0.
The following functions for manipulating attribute values are available:
<:lower> = lowercase letters only (mary sömerville)
<:upper> = uppercase letters only (MARY SÖMERVILLE)
<:umlauts> = replace vowel mutations (Mary Soemerville)
<:strip> = remove spaces (MarySömerville)
A combination is also possible:
<:lower,umlauts,strip> = marysoemerville
Using the User Template
Once the user template has been saved, it is available as a new option to be selected when new users are created:
After you have created a new user account, the values set in the user template are also adopted for the new account:
Instead of being limited to a single user template, UCS can store any number of templates, for example one for each department or arranged according to other criteria suitable for the respective organization.