Hi,
since Errata 489 of UCS 5.0 it is possible to include “operational attributes” in UDMs extended attribute mechanism, which allows to get access to internal information of OpenLDAP.
I’d like to share the following example in which I add 6 operational attributes to be shown in an “LDAP Details” section of user and group objects. This includes information about the creation and modification timestamp and also the internal OpenLDAP Database ID “EntryUUID”.
Code to create the attributes on the command line:
udm settings/extended_attribute create \
--position "cn=custom attributes,cn=univention,$(ucr get ldap/base)" \
--set name="createTimestamp" \
--set CLIName="createTimestamp" \
--set ldapMapping="createTimestamp" \
--set shortDescription="timestamp of object creation" \
--set translationShortDescription='de_DE "Zeitstempel der Objekterstellung"' \
--set longDescription="Database timestamp of the LDAP object creation, typically UTC" \
--set translationLongDescription='de_DE "Zeitpunkt der Erstellung des LDAP Objekts, typischer Weise UTC"' \
--set tabName="LDAP details" \
--set tabPosition="1" \
--set translationTabName='de_DE "LDAP Details"' \
--set groupName="object creation" \
--set translationGroupName='de_DE "Objekterstellung"' \
--set groupPosition="1" \
--append module="users/user" \
--append module="groups/group" \
--set objectClass="top" \
--set syntax="string" \
--set copyable=1
udm settings/extended_attribute create \
--position "cn=custom attributes,cn=univention,$(ucr get ldap/base)" \
--set name="creatorsName" \
--set CLIName="creatorsName" \
--set ldapMapping="creatorsName" \
--set shortDescription="LDAP DN of the object creator" \
--set translationShortDescription='de_DE "LDAP DN des Objekterstellers"' \
--set longDescription="LDAP DN of the authenticated account which created the object" \
--set translationLongDescription='de_DE "LDAP DN des authentifizierten Accounts der das Objekt angelegt hat"' \
--set tabName="LDAP details" \
--set tabPosition="2" \
--set translationTabName='de_DE "LDAP Details"' \
--set groupName="object creation" \
--set translationGroupName='de_DE "Objekterstellung"' \
--set groupPosition="1" \
--append module="users/user" \
--append module="groups/group" \
--set objectClass="top" \
--set syntax="string" \
--set fullWidth="1"
udm settings/extended_attribute create \
--position "cn=custom attributes,cn=univention,$(ucr get ldap/base)" \
--set name="modifyTimestamp" \
--set CLIName="modifyTimestamp" \
--set ldapMapping="modifyTimestamp" \
--set shortDescription="timestamp of last object modification" \
--set translationShortDescription='de_DE "Zeitstempel der letzten Objektänderung"' \
--set longDescription="Database timestamp of the last LDAP object modification, typically UTC" \
--set translationLongDescription='de_DE "Zeitpunkt der letzten Änderung des LDAP Objekts, typischer Weise UTC"' \
--set tabName="LDAP details" \
--set tabPosition="3" \
--set translationTabName='de_DE "LDAP Details"' \
--set groupName="object modification" \
--set translationGroupName='de_DE "Objektveränderung"' \
--set groupPosition="2" \
--append module="users/user" \
--append module="groups/group" \
--set objectClass="top" \
--set syntax="string"
udm settings/extended_attribute create \
--position "cn=custom attributes,cn=univention,$(ucr get ldap/base)" \
--set name="modifiersName" \
--set CLIName="modifiersName" \
--set ldapMapping="modifiersName" \
--set shortDescription="LDAP DN of the object modifier" \
--set translationShortDescription='de_DE "LDAP DN des Objektmodifizierenden"' \
--set longDescription="LDAP DN of the authenticated account which did the last object modification" \
--set translationLongDescription='de_DE "LDAP DN des authentifizierten Accounts der das Objekt zuletzt modifiziert hat"' \
--set tabName="LDAP details" \
--set tabPosition="4" \
--set translationTabName='de_DE "LDAP Details"' \
--set groupName="object modification" \
--set translationGroupName='de_DE "Objektveränderung"' \
--set groupPosition="2" \
--append module="users/user" \
--append module="groups/group" \
--set objectClass="top" \
--set syntax="string" \
--set fullWidth="1"
udm settings/extended_attribute create \
--position "cn=custom attributes,cn=univention,$(ucr get ldap/base)" \
--set name="entryUUID" \
--set CLIName="entryUUID" \
--set ldapMapping="entryUUID" \
--set shortDescription="entryUUID" \
--set translationShortDescription='de_DE "entryUUID"' \
--set longDescription="Internal LDAP database ID" \
--set translationLongDescription='de_DE "Interne LDAP Datenbank-ID"' \
--set tabName="LDAP details" \
--set tabPosition="5" \
--set translationTabName='de_DE "LDAP Details"' \
--set groupName="LDAP database details" \
--set translationGroupName='de_DE "LDAP Datenbankdetails"' \
--set groupPosition="3" \
--append module="users/user" \
--append module="groups/group" \
--set objectClass="top" \
--set syntax="string" \
--set fullWidth="1"
udm settings/extended_attribute create \
--position "cn=custom attributes,cn=univention,$(ucr get ldap/base)" \
--set name="entryDN" \
--set CLIName="entryDN" \
--set ldapMapping="entryDN" \
--set shortDescription="entryDN" \
--set translationShortDescription='de_DE "entryDN"' \
--set longDescription="Distinguished Name (DN) of this LDAP object" \
--set translationLongDescription='de_DE "Distinguished Name (DN) dieses LDAP-Objects"' \
--set tabName="LDAP details" \
--set tabPosition="6" \
--set translationTabName='de_DE "LDAP Details"' \
--set groupName="LDAP database details" \
--set translationGroupName='de_DE "LDAP Datenbankdetails"' \
--set groupPosition="3" \
--append module="users/user" \
--append module="groups/group" \
--set objectClass="top" \
--set syntax="string" \
--set fullWidth="1"
Restart the UMC and the UDM REST API to make them aware of the change:
systemctl restart univention-management-console-server.service
systemctl restart univention-directory-manager-rest.service
Example screenshot of the result (a user object in the UMC):
Hope this is helpfull!