Harbor Configuring LDAP

Source: Internet
Author: User
Tags ldap docker run

1, modify the configuration Harborp configuration file, a total of three changes

1.1 Auth_mode = Ldap_auth

1.2 Ldap_url = ldap://10.10.20.202

1.3 Ldap_basedn = uid=%s,dc=example,dc=com

2, implementation./prepare

3. Restart Harbor

Docker-compose stop

Docker-compose RM

Docker-compose up-d

"LDAP built through Docker"

1, create LDAP, new build_ldap.sh, content as follows, and execute

Name=Ldap_serverdockerRM-F $NAME2>/dev/NULLDocker Run--Envldap_organisation="Unitedstack Inc." --Envldap_domain="example.com" --Envldap_admin_password="123456" -P389:389 -P636:636 --detach--name $NAME Osixia/openldap:1.1.2

2, new user, new New_user.ldif, the content is as follows:

dn:uid=test,dc=example,dc=3/bin//home/   1001  1001123456Mail: [Email protected]gecos:test

Create a new adduser.sh that reads as follows and executes

CP new_user.ldif ldap_server:/-"cn=admin,dc=example,dc=com" -W123456-f/new_user.ldif-zz 

3, new is_user_exist.sh, see if the user exists, the content is as follows, and execute

Docker exec ldap_server ldapsearch-x-"cn=admin,dc=example,dc=com"  -w 123456

Harbor Configuring LDAP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.