-
Notifications
You must be signed in to change notification settings - Fork 3
LDAP Commands
Tom Mitchell edited this page Mar 20, 2017
·
1 revision
You can check the LDAP database by searching for an entry as follows:
ldapsearch -xLLL -b "dc=gpolab,dc=bbn,dc=com" uid=john sn givenName cn
You can search as the admin user too:
ldapsearch -xLLL -D cn=admin,dc=gpolab,dc=bbn,dc=com -w shibidp \
-b "dc=gpolab,dc=bbn,dc=com" uid=john userPassword
To update an entry, create a file with contents like this:
dn: uid=tmitchel,ou=people,dc=gpolab,dc=bbn,dc=com
changetype: modify
replace: telephoneNumber
telephoneNumber: 617-873-3200
Then execute this:
/usr/bin/ldapmodify -x -D cn=admin,dc=gpolab,dc=bbn,dc=com -w shibidp \
-f mod-users.ldif
To delete an entry:
/usr/bin/ldapdelete -x -D cn=admin,dc=gpolab,dc=bbn,dc=com -w shibidp \
uid=aneuman,ou=people,dc=gpolab,dc=bbn,dc=com