Docker 搭建 LDAP
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 搭建 phpLDAPadmin
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 ~]
dn: dc=ihopeit,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
o: ihopeit
dc: ihopeit
dn: cn=admin,dc=ihopeit,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword:: e1NTSEF9VXFlYkNzZUhDSmY3cW9Jbm9ISHFiVDFhQ3VxU2g0VGY=
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: 2
result: 0 Success
登录账户
DN: cn=admin,dc=ihopeit,dc=com
PASSWORD: admin_passwd_4_ldap
OpenLDAP文章
推荐文章
|