RBACRole - syncUsers_4
This command synchronizes users belonging to an external directory group to the specified role. The command also recursively searches for users of the subgroups that belong to the specified group and sychronizes them as well.
Prerequisite: To run this command, the role you used to initiate this BLCLI session must have read and write access to the users in the role you want to sync. Specifically, the BLCLI role must have User.Read, User.Modify, User.ModifyProperties and User.Delete permission for any users already assigned to the role you specify using the roleName argument.
You can use this command as part of the setup for the Active Directory user synchronization feature. For information about this feature, see the RBAC section of the BMC BladeLogic User Guide (Managing Access).
For ldapConnection, specify a named LDAP connection that you already created by using the Ldap : createConnection command.
For automationPrincipalName, specify the name of an automation principal that you already created by using the Impersonation : createAutomationPrincipal command.
Return type : DBKey
Command Input :
Name of the role on which you want to perform the synchronization operation.
Name of an existing LDAP connection.
Name of an existing automation principal.
Distinguished name of the directory group from which to synchronize users.
LDAP filter to query users with.
Name of the LDAP attribute where the username is stored.
LDAP filter to query subgroups with.
Name of the LDAP attribute where the group members are stored.
The following example synchronizes all users of AD group CN=Administrators,CN=Users,DC=us,DC=sso,DC=bmc,DC=com configured on ActiveDirectory server engw2k8x64sso8.sso.bmc.com with the RBAC role DemoUS. It also synchronizes users of any subgroups that belong to the specified AD group. This is simply an additive operation; existing users of the role are kept intact. The query parameters specify how to find the users belonging to the RBAC role DemoUS in the ActiveDirectory server. The synchronization operation never affects reserved users (BLAdmin and RBACAdmin) or any users for whom the isSynchronizable property is set to false.
This example assumes that you have already created an LDAP connection and an automation principal.
RBACRole syncUsers DemoUS SSO DirAdmin CN=Administrators,CN=Users,DC=us,DC=sso,DC=bmc,DC=com (objectClass=user) userPrincipalName (objectClass=group) member