转 CentOS7安装OpenLdap( 二 )

  • CN即Common Name,CN有可能代表一个用户名,例如cn=Manager,dc=zhidaoauto,dc=com表示在/com/zhidaoauto域下的管理员用户Manager
  • OU即Organizational Unit,例如ou=People,dc=zhidaoauto,dc=com表示在/com/zhidaoauto域下的一个组织单元People
  • 写入:
    ldapadd -x -D cn=Manager,dc=zhidaoauto,dc=com -W -f basedomain.ldifEnter LDAP Password:adding new entry "dc=zhidaoauto,dc=com"adding new entry "cn=Manager,dc=zhidaoauto,dc=com"adding new entry "ou=People,dc=zhidaoauto,dc=com"adding new entry "ou=Group,dc=zhidaoauto,dc=com"测试:
    ldapsearch -LLL -W -x -D "cn=Manager,dc=zhidaoauto,dc=com" -H ldap://localhost -b "dc=zhidaoauto,dc=com"Enter LDAP Password:dn: dc=zhidaoauto,dc=comobjectClass: topobjectClass: dcObjectobjectClass: organizationo: zhidaoauto comdc: zhidaoautodn: cn=Manager,dc=zhidaoauto,dc=comobjectClass: organizationalRolecn: Managerdescription: Directory Managerdn: ou=People,dc=zhidaoauto,dc=comobjectClass: organizationalUnitou: Peopledn: ou=Group,dc=zhidaoauto,dc=comobjectClass: organizationalUnitou: Group管理工具
    Docker run -d --privileged -p 10004:80 --name myphpldapadmin --env PHPLDAPADMIN_HTTPS=false --env PHPLDAPADMIN_LDAP_HOSTS="192.168.10.240" --detach osixia/phpldapadmin



    推荐阅读