Jenkins Authorize with LDAP Install LDAP plugin login to jenkins, go to Manage Jenkins -> Manage Plugins -> Available to install LDAP plugin.
Configure LDAP plugin login to jenkins, go to Manage Jenkins -> Configure Global Security -> Access Coutrol to configure LDAP.
Server: <host name of ldap server>, possible value: 192.168.1.101, ldap.example.com root DN: usually be dc=my-domain,dc=com User search base: usually be ou=People User search filter: usually be uid={0} Manager DN: usually be cn=Manager,dc=my-domain,dc=com or cn=admin,dc=my-domain,dc=com Manager Password: Your Manager password Display Name LDAP attribute: usually be displayname Email Address LDAP attribute: usually be mail
establish openldap server Install and start service yum install openldap-servers openldap-clients cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG chown ldap. /var/lib/ldap/DB_CONFIG systemctl start slapd systemctl enable slapd setup OpenLDAP manager password generate encrptyed password:
# slappasswd New password: Re-enter new password: {SSHA}2aaO8Jrm2AkRYmI8dMptxesNsQ9bI2y8 string {SSHA}xxxxxxxxxxxxxxxxxxxxxxxx are encrypted password, it will be used later. then, create file like below.
cat > chrootpw.ldif << "EOF" dn: olcDatabase={0}config,cn=config changetype: modify add: olcRootPW olcRootPW: {SSHA}2aaO8Jrm2AkRYmI8dMptxesNsQ9bI2y8 EOF import this file:
ubuntu网络认证 安装必要软件 sudo apt install libnss-ldap ldapscripts 某些配置条目可能如下:
base dc=tianyisc,dc=com
uri ldap://192.168.99.89/
binddn cn=Manager,dc=tianyisc,dc=com
bindpw password
rootbinddn cn=Manager,dc=tianyisc,dc=com
Now configure the LDAP profile for NSS:
sudo auth-client-config -t nss -p lac_ldap Configure the system to use LDAP for authentication:
sudo pam-auth-update 添加用户 ldapscript(方式一) Install the package:
sudo apt install ldapscripts Then edit the file /etc/ldapscripts/ldapscripts.conf to arrive at something similar to the following:
SERVER=localhost
BINDDN='cn=admin,dc=example,dc=com'
BINDPWDFILE="/etc/ldapscripts/ldapscripts.passwd"
SUFFIX='dc=example,dc=com'
GSUFFIX='ou=Groups'
USUFFIX='ou=People'
MSUFFIX='ou=Computers'
GIDSTART=10000
UIDSTART=10000
MIDSTART=10000
Now, create the ldapscripts.