前端数据如下:
### frontend.ldif ### dn: dc=ldap,dc=example,dc=com objectclass: top objectclass: dcObject objectclass: organization dc: ldap o: ec dn: ou=people,dc=ldap,dc=example,dc=com objectclass: top objectclass: organizationalUnit ou: people dn: uid=user01,ou=people,dc=ldap,dc=example,dc=com objectClass: top objectclass: uidObject objectclass: person uid: user01 cn: harry sn: potter userpassword:123 dn: uid=user02,ou=people,dc=ldap,dc=example,dc=com objectClass: top objectclass: uidObject objectclass: person uid: user02 cn: lucy sn: marry userpassword:123
添加前端的命令:
ldapadd -x -D cn=admin,dc=ldap,dc=example,dc=com -W -f frontend.ericsson.ldif
或者:
ldapadd -x -D cn=admin,dc=ldap,dc=example,dc=com -w secret -f frontend.ericsson.ldif
查询命令:
ldapsearch -x -h ip -p 389 -b "dc=ldap,dc=example,dc=com" -s sub "(objectClass=*)"