启动ldap

service slapd start

slapd -d1 打印启动过程

生成密码

slappasswd -h {SSHA} -s "123456"

修改密码

ldappasswd -H ldap://127.0.0.1:389 -x -D "cn=Manager,dc=domain,dc=com" -W -S "uid=user,ou=People,dc=domain,dc=com"

ldappasswd -H ldap://127.0.0.1:389 -x -D "uid=username,ou=People,dc=domain,dc=com" -w'123456' -s '654321' "uid=username,ou=People,dc=domain,dc=com"

查询记录

ldapsearch -x -b "uid=username,ou=People,dc=domain,dc=com"

ldapsearch -h 127.0.0.1 -p 389 -x -D "cn=Manager,dc=domain,dc=com" -w'secret' -b "ou=People,dc=domain,dc=com" "uid=username"

删除记录

ldapdelete -x -D "cn=Manager,dc=domain,dc=com" -W "uid=myldapuser1,ou=People,dc=domain,dc=com"

添加记录

ldapadd -H ldap://127.0.0.1 -x -D "cn=Manager,dc=domain,dc=com" -f ldapbackup.ldif -w secret

results matching ""

    No results matching ""