Setting up an administrator group
About this task
The following example shows how to set up a group of administrators that have access rights to the whole PingDirectory server.
|
The example uses a static group using the |
Steps
-
Create an LDIF file with an example administrator group.
Example:
For this example, name the file
admin-group.ldifdn: ou=Groups,dc=example,dc=com objectClass: organizationalunit objectClass: top ou: Groups dn: cn=Dir Admins,ou=Groups,dc=example,dc=com objectClass: groupofuniquenames objectClass: top uniqueMember: uid=user.0, ou=People, dc=example,dc=com uniqueMember: uid=user.1, ou=People, dc=example,dc=com cn: Dir Admins ou: Groups
-
To add the entries, use the
ldapmodifytool.Example:
$ bin/ldapmodify --defaultAdd --filename admin-group.ldif -
To add the ACI to the root suffix or base DN to provide full access to the PingDirectory server to the new administrator, create another LDIF file.
Example:
For this example, name the file
admin-aci.ldif.dn: dc=example,dc=com changetype: modify add: aci aci: (target="ldap:///dc=example,dc=com") (targetattr != "aci") (version 3.0; acl "allow all Admin group"; allow(all) groupdn = "ldap:///cn=Dir Admins,ou=Groups,dc=example,dc=com";) -
To add the ACI, use the
ldapmodifytool.Example:
$ bin/ldapmodify --filename admin-aci.ldif -
To verify the additions, use the
ldapsearchtool.Example:
In the following example, the first command searches for the entry that contains
cn=Dir Adminsand returns it if the search is successful. The second command searches for the base DN and returns only those operational attributes, including ACIs, associated with the entry.$ bin/ldapsearch --baseDN dc=example,dc=com "(cn=Dir Admins)" $ bin/ldapsearch --baseDN dc=example,dc=com --searchScope base \ "(objectclass=*)" "+" -
To add specific privileges to each administrator account, use an LDIF file.
Example:
For this example, name the file
admin-priv.ldif.For this example, add the
password-resetprivilege to theuser.0administrator account from the command line. To add the privilege, use theldapmodifytool. Repeat the process for the other administrators configured in the administrator group.dn: uid=user.0,ou=People,dc=example,dc=com changetype: modify add: ds-privilege-name ds-privilege-name: password-reset $ bin/ldapmodify --filename admin-priv.ldif
Result:
Processing MODIFY request for uid=user.0,dc=example,dc=com MODIFY operation successful for DN uid=user.0,dc=example,dc=com
-
To assign a password policy for the administrator account, use an LDIF file. Save the file as
admin-pwd-policy.ldif.Example:
For example, create an
Admin Password Policy, then add the password policy to the account. To apply the password policy to the account, use theldapmodifytool.dn: uid=user.0,dc=example,dc=com changetype: modify add: ds-pwp-password-policy-dn ds-pwp-password-policy-dn: cn=Admin Password Policy,cn=Password Policies,cn=config $ bin/ldapmodify --filename admin-pwd-policy.ldif