slappasswd -s "admin_password" -h {CRYPT}
With output looking like : {CRYPT}vplKS/g3SDPiEflag | usage |
---|---|
-W | prompt for password |
-D | launch command as the following user |
-x | Use simple authentication instead of SASL |
-H | apply command to the following LDAP server |
ldapadd -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost -f /etc/ldap/TP_files/file01-initialize_LDAP_DB.ldif
If ldapadd returnsldap_bind: Invalid DN syntax (34) additional info: invalid DNsomething may be wrong with the credentials.
ldapadd -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost -f /etc/ldap/TP_files/file02-add_LDAP_entry.ldif
ldapsearch -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost -b "dc=capen,dc=sis" "(uid=b*)"
ldapsearch -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost -b "dc=capen,dc=sis" "(uid=*sa*)"
ldapsearch -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost -b "dc=capen,dc=sis" "(gidNumber=100)"
ldapsearch -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost -b "dc=capen,dc=sis" "(&(gidNumber=100)(objectClass=posixAccount))" homeDirectory
ldapdelete -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost "uid=,ou=,dc=capen,dc=sis"
ldapmodify -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost -f /etc/ldap/TP_files/file03-modify_add_LDAP_entry.ldif
ldapmodify -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost -f /etc/ldap/TP_files/file04-modify_delete_LDAP_entry.ldif
ldapmodify -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost -f /etc/ldap/TP_files/file05-modify_add_attribute.ldif
ldapmodify -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost -f /etc/ldap/TP_files/file06-modify_delete_attribute.ldif
ldapmodify -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost -f /etc/ldap/TP_files/file07-modify_attribute.ldif
ldapmodify -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost -f /etc/ldap/TP_files/file08-modify_several_attributes.ldif
ldapmodrdn -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost "uid=bart,ou=users,dc=capen,dc=sis" "uid=bartolome"
ldappasswd -W -D "cn=admin,dc=capen,dc=sis" -x -H ldap://localhost "cn=pam_nss,ou=applications,ou=people,dc=capen,dc=sis" -S