LDAP Commands |
1 | ldapwhoami -x -D "uid=dadmin,cn=users,dc=stevedunlap,dc=com" -W | Test LDAP authentication with the specified user. |
2 | ldapwhoami -x -D "cn=Directory Manager" -W | Test authentication with the Directory Manager account. |
3 | ldapwhoami -Y EXTERNAL -H ldapi:/// | Test external SASL authentication over the ldapi protocol. |
4 | ldapsearch -x -LLL -b "dc=stevedunlap,dc=com" "(objectClass=inetOrgPerson)" | Search for all entries of objectClass inetOrgPerson in the base DN. |
5 | ldapsearch -x -LLL -b "cn=users,dc=stevedunlap,dc=com" "(objectClass=*)" | Retrieve all entries under the 'users' container. |
6 | ldapsearch -x -LLL -b "cn=subschema" "(objectClass=*)" objectClasses | Retrieve available objectClasses in the LDAP schema. |
7 | ldapsearch -x -LLL -b "uid=root,cn=users,dc=stevedunlap,dc=com" | Search for the root user's entry in the LDAP directory. |
8 | ldapadd -x -D "uid=dadmin,cn=users,dc=stevedunlap,dc=com" -W -f contacts.ldif | Import contacts from an LDIF file into LDAP using the dadmin account. |
9 | ldapadd -x -D "cn=Directory Manager" -W -f dadmin.ldif | Add the Directory Manager user from the specified LDIF file. |
10 | ldapmodify -x -D "uid=dadmin,cn=users,dc=stevedunlap,dc=com" -W -f delete.ldif | Modify or delete LDAP entries using the specified LDIF file. |
11 | slapcat -b "dc=stevedunlap,dc=com" -l users_backup.ldif | Export all LDAP entries to an LDIF file for backup. |
12 | slapcat -n 0 -l ldap_config_backup.ldif | Export the LDAP configuration (schemas, ACLs, etc.) to an LDIF file. |