Problem
Typically, contacts or users are removed from OX by deleting a user object from LDAP.
In our case, the user objects were successfully removed from LDAP, but the removed users still appear as contacts in the global address book.
How is it possible to successfully remove them from OX and thus from the global address book?
Environment
UCS: 5.0-5 errata857
Installed: ox-connector=2.2.7 oxseforucs=7.10.6-ucs9
Solution
1. Log in as root and run the following command to list all ox contacts/users.
/opt/open-xchange/sbin/listuser -A oxadmin -P $(< /etc/ox-secrets/context10.secret) -c 10
It is also possible to filter the multiple users with grep:
/opt/open-xchange/sbin/listuser -A oxadmin -P $(< /etc/ox-secrets/context10.secret) -c 10 | grep -E '(uni|vention)'
360 uni.example Uni Example uni.example@univention.de -1
297 vention.example Vention Example vention.example@univention.de -1
2. Now it is possible to remove the user from ox so the global address book by entering the ID of the user (in our case 360) as follows.
/opt/open-xchange/sbin/deleteuser -A oxadmin -P $(< /etc/ox-secrets/context10.secret) -c 10 -i 360
user 360 in context 10 deleted