docker run -p 389:389 -p 636:636 --name my-openldap-container --env LDAP_ORGANISATION="ihopeit" --env LDAP_DOMAIN="ihopeit.com" --env LDAP_ADMIN_PASSWORD="admin_passwd_4_ldap" --detach osixia/openldap:1.4.0
docker run -p 80:80 -p 443:443 --name phpldapadmin-service --hostname phpldapadmin-service --link my-openldap-container --env PHPLDAPADMIN_LDAP_HOSTS=my-openldap-container --detach osixia/phpldapadmin:0.9.0
https://ip
docker exec my-openldap-container ldapsearch -x -H ldap://localhost -b dc=ihopeit,dc=com -D "cn=admin,dc=ihopeit,dc=com" -w admin_passwd_4_ldap
[root@localhost ~]# docker exec my-openldap-container ldapsearch -x -H ldap://localhost -b dc=ihopeit,dc=com -D "cn=admin,dc=ihopeit,dc=com" -w admin_passwd_4_ldap # extended LDIF # # LDAPv3 # base <dc=ihopeit,dc=com> with scope subtree # filter: (objectclass=*) # requesting: ALL # # ihopeit.com dn: dc=ihopeit,dc=com objectClass: top objectClass: dcObject objectClass: organization o: ihopeit dc: ihopeit # admin, ihopeit.com dn: cn=admin,dc=ihopeit,dc=com objectClass: simpleSecurityObject objectClass: organizationalRole cn: admin description: LDAP administrator userPassword:: e1NTSEF9VXFlYkNzZUhDSmY3cW9Jbm9ISHFiVDFhQ3VxU2g0VGY= # ducheng, admin, ihopeit.com dn: uid=ducheng,cn=admin,dc=ihopeit,dc=com objectClass: posixAccount objectClass: top objectClass: inetOrgPerson gidNumber: 0 givenName: du sn: cheng displayName: ducheng uid: ducheng homeDirectory: cn=admin cn: ducheng uidNumber: 8528 # search result search: 2 result: 0 Success # numResponses: 4 # numEntries: 3
DN: cn=admin,dc=ihopeit,dc=com PASSWORD: admin_passwd_4_ldap
推荐文章