7. Univention Directory Manager (UDM)#
The Univention Directory Manager (UDM) is a wrapper for LDAP objects. Traditionally, LDAP stores objects as a collection of attributes, which are defines by so called schemata. Modifying entries is slightly complicated, as there are no high-level operations to add or remove values from multi-valued attributes, or to keep the password used by different authentication schemes such as Windows NTLM-hashes, Unix MD5 hashes, or Kerberos tickets in sync.
The command line client udm provides different modes of operation.
udm [--binddn bind-dn --bindpwd bind-password] [module] [mode] [options]
- Creating object
udm
module create --set property=value …$ eval "$(ucr shell)" $ udm container/ou create --position "$ldap_base" --set name="xxx"
Multiple
--sets may be used to set the values of a multi-valued property.The equivalent LDAP command would look like this:
$ eval "$(ucr shell)" $ ldapadd -D "cn=admin,$ldap_base" -y /etc/ldap.secret <<__EOT__ dn: uid=xxx,$ldap_base objectClass: organizationalRole cn: xxx __EOT__
- List object
udm
module list [--dn dn | --filter property=value]$ udm container/ou list --filter name="xxx"
$ univention-ldapsearch cn=xxx
- Modify object
udm
module modify [--dn dn | --filter property=value] [--set property=value | --append property=value | --remove property=value …]$ udm container/ou modify --dn "cn=xxx,$ldap_base" --set name="xxx"
For multi-valued attributes
--appendand--removecan be used to add additional values or remove existing values.--setoverwrites any previous value, but can also be used multiple times to specify further values.--setand--appendshould not be mixed for any property in one invocation.- Delete object
udm
module remove [--dn dn | --filter property=value]$ udm container/ou delete --dn "cn=xxx,$ldap_base"
If
--filteris used, it must match exactly one object. Otherwise udm refuses to delete any object.
This chapter has the following content:
- 7.1. UDM modules
- 7.1.1. Overview
- 7.1.2. Structure of a module
- 7.1.2.1. Global variables
- 7.1.2.2. Mandatory variables
moduleoperationsshort_descriptionlong_descriptionchildsoptionsproperty_descriptionsproperty_descriptions.short_descriptionproperty_descriptions.long_descriptionproperty_descriptions.syntaxproperty_descriptions.multivalueproperty_descriptions.requiredproperty_descriptions.may_changeproperty_descriptions.editableproperty_descriptions.identifiesproperty_descriptions.dontsearchproperty_descriptions.defaultproperty_descriptions.options
layoutmapping
- 7.1.2.3. Optional arguments
- 7.1.2.4. The Python class
object - 7.1.2.5. The
identify()andlookup()functions
- 7.1.3. Example module
- 7.2. UDM syntax
- 7.3. Package extended attributes
- 7.4. Package UDM hooks
- 7.5. Package UDM extension modules
- 7.6. Package UDM syntax extension
- 7.7. UDM HTTP REST API