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
--set
s 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
--append
and--remove
can be used to add additional values or remove existing values.--set
overwrites any previous value, but can also be used multiple times to specify further values.--set
and--append
should 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
--filter
is 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
module
operations
short_description
long_description
childs
options
property_descriptions
property_descriptions.short_description
property_descriptions.long_description
property_descriptions.syntax
property_descriptions.multivalue
property_descriptions.required
property_descriptions.may_change
property_descriptions.editable
property_descriptions.identifies
property_descriptions.dontsearch
property_descriptions.default
property_descriptions.options
layout
mapping
- 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
- 7.8. UCS 5.0: Python 3 migration of modules and extensions