Remove a user from one group and add them to another

Hello everyone,
using univention-directory-manager from the shell I can’t remove a user from a secondary group and then add him to another (essentially he has to change group).

The commands used so far without success rotated to the following syntax:

univention-directory-manager users/user modify --dn "uid=<user_name>,cn=schueler,cn=users,ou=sc1,dc=mysite,dc=com" --remove "groups=sc1-3ABC,cn=klassen,cn=schueler,cn=groups,ou=sc1,dc=mysite,dc=com"

Where am I wrong?

Thank you all

Hey ivanterzo,

I would advise you the switch the logic and remove the user from the class:

univention-directory-manager groups/group modify --dn "cn=sc1-3ABC,cn=klassen,cn=schueler,cn=groups,ou=sc1,dc=mysite,dc=com" --remove users="uid=<user_name>,cn=schueler,cn=users,ou=sc1,dc=mysite,dc=com"

Best regards

1 Like

:+1: thanks a lot!!!

1 Like