Use this command to give a user the same group memberships
as another user.
Purpose
Use the
duplicateMembershipOfUser command
to make a user a member of all the same groups as another user. For
example, user1 is in group B and group C. Use the duplicateMembershipOfUser
command to add user2 to the same groups as user1.
If successful,
the duplicateMembershipOfUser command returns the
unique name of the user specified in the copyToUniqueName parameter.
command
Syntax
duplicateMembershipOfUser { -copyFromUniqueName uniqueName -copyToUniqueName uniqueName }
Parameters
- -copyFromUniqueName uniqueName
- Specifies the name of the user from which you want to copy the
group memberships for another user to use.
- -copyToUniqueName uniqueName
- Specifies the name of the user to which you want to add the memberships
of the user specified in the copyFromUniqueName parameter.
Sample
To make the user called meyersd a member
of all the groups that the user jhart belongs to, issue this command:
$AdminTask duplicateMembershipOfUser
{-copyFromUniqueName uid=jhart,cn=users,dc=yourco,dc=com
-copyToUniqueName uid=meyersd,cn=users,dc=yourco,dc=com }