LDAP: различия между версиями
Материал из noname.com.ua
Перейти к навигацииПерейти к поискуSirmax (обсуждение | вклад) |
Sirmax (обсуждение | вклад) |
||
Строка 39: | Строка 39: | ||
==Настройка== |
==Настройка== |
||
+ | <PRE> |
||
+ | dpkg-reconfigure slapd |
||
+ | </PRE> |
||
+ | |||
+ | |||
+ | |||
<PRE> |
<PRE> |
||
slapcat |
slapcat |
||
− | + | 56f3b96c ldif_read_file: checksum error on "/etc/ldap/slapd.d/cn=config.ldif" |
|
− | dn: dc=demo |
+ | dn: dc=demo |
objectClass: top |
objectClass: top |
||
objectClass: dcObject |
objectClass: dcObject |
||
Строка 49: | Строка 55: | ||
dc: demo |
dc: demo |
||
structuralObjectClass: organization |
structuralObjectClass: organization |
||
− | entryUUID: |
+ | entryUUID: 2dd35bc8-85f2-1035-8d51-1b798eec3e6d |
− | creatorsName: cn=admin,dc=demo |
+ | creatorsName: cn=admin,dc=demo |
− | createTimestamp: |
+ | createTimestamp: 20160324095443Z |
− | entryCSN: |
+ | entryCSN: 20160324095443.807089Z#000000#000#000000 |
− | modifiersName: cn=admin,dc=demo |
+ | modifiersName: cn=admin,dc=demo |
− | modifyTimestamp: |
+ | modifyTimestamp: 20160324095443Z |
− | dn: cn=admin,dc=demo |
+ | dn: cn=admin,dc=demo |
objectClass: simpleSecurityObject |
objectClass: simpleSecurityObject |
||
objectClass: organizationalRole |
objectClass: organizationalRole |
||
cn: admin |
cn: admin |
||
description: LDAP administrator |
description: LDAP administrator |
||
− | userPassword:: |
+ | userPassword:: e1NTSEF9akxUN0FaVGN2OGg4d0FPcHNQWHJPWG8wL3VleXJIaWs= |
structuralObjectClass: organizationalRole |
structuralObjectClass: organizationalRole |
||
− | entryUUID: |
+ | entryUUID: 2dd3e822-85f2-1035-8d52-1b798eec3e6d |
− | creatorsName: cn=admin,dc=demo |
+ | creatorsName: cn=admin,dc=demo |
− | createTimestamp: |
+ | createTimestamp: 20160324095443Z |
− | entryCSN: |
+ | entryCSN: 20160324095443.810666Z#000000#000#000000 |
− | modifiersName: cn=admin,dc=demo |
+ | modifiersName: cn=admin,dc=demo |
− | modifyTimestamp: |
+ | modifyTimestamp: 20160324095443Z |
</PRE> |
</PRE> |
||
+ | |||
+ | |||
+ | |||
<PRE> |
<PRE> |
||
ldapsearch -D "cn=admin,dc=demo,dc=com" -w r00tme |
ldapsearch -D "cn=admin,dc=demo,dc=com" -w r00tme |
||
+ | </PRE> |
||
+ | <PRE> |
||
# extended LDIF |
# extended LDIF |
||
# |
# |
||
Строка 83: | Строка 94: | ||
search: 2 |
search: 2 |
||
result: 32 No such object |
result: 32 No such object |
||
− | |||
# numResponses: 1 |
# numResponses: 1 |
||
</PRE> |
</PRE> |
||
− | |||
− | |||
− | |||
==Jenkins== |
==Jenkins== |
Версия 11:55, 24 марта 2016
LDAP
Нужна минимальная инсталляция LDAP для интеграции CD/CD инструментов - gerrit и jenkins
OS: Ubunti 14.04
Подготовка
- add key
mkdir -p /root/.ssh /root/.ssh/authorized_keys
Установка пакетов:
sudo apt-get update sudo apt-get install slapd ldap-utils phpldapadmin mc vim strace tcpdump tcpflow
После установки
Check for running processes:
ps -auxfw <SKIP> openldap 3945 0.0 0.2 194060 8276 ? Ssl 11:24 0:00 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d root 5073 0.0 0.7 241084 22484 ? Ss 11:24 0:00 /usr/sbin/apache2 -k start www-data 5076 0.0 0.2 241108 7324 ? S 11:24 0:00 \_ /usr/sbin/apache2 -k start www-data 5077 0.0 0.2 241108 7324 ? S 11:24 0:00 \_ /usr/sbin/apache2 -k start www-data 5078 0.0 0.2 241108 7324 ? S 11:24 0:00 \_ /usr/sbin/apache2 -k start www-data 5079 0.0 0.2 241108 7324 ? S 11:24 0:00 \_ /usr/sbin/apache2 -k start www-data 5080 0.0 0.2 241108 7324 ? S 11:24 0:00 \_ /usr/sbin/apache2 -k start
Настройка
dpkg-reconfigure slapd
slapcat 56f3b96c ldif_read_file: checksum error on "/etc/ldap/slapd.d/cn=config.ldif" dn: dc=demo objectClass: top objectClass: dcObject objectClass: organization o: demo dc: demo structuralObjectClass: organization entryUUID: 2dd35bc8-85f2-1035-8d51-1b798eec3e6d creatorsName: cn=admin,dc=demo createTimestamp: 20160324095443Z entryCSN: 20160324095443.807089Z#000000#000#000000 modifiersName: cn=admin,dc=demo modifyTimestamp: 20160324095443Z dn: cn=admin,dc=demo objectClass: simpleSecurityObject objectClass: organizationalRole cn: admin description: LDAP administrator userPassword:: e1NTSEF9akxUN0FaVGN2OGg4d0FPcHNQWHJPWG8wL3VleXJIaWs= structuralObjectClass: organizationalRole entryUUID: 2dd3e822-85f2-1035-8d52-1b798eec3e6d creatorsName: cn=admin,dc=demo createTimestamp: 20160324095443Z entryCSN: 20160324095443.810666Z#000000#000#000000 modifiersName: cn=admin,dc=demo modifyTimestamp: 20160324095443Z
ldapsearch -D "cn=admin,dc=demo,dc=com" -w r00tme
# extended LDIF # # LDAPv3 # base <> (default) with scope subtree # filter: (objectclass=*) # requesting: ALL # # search result search: 2 result: 32 No such object # numResponses: 1
Jenkins
Manage Jenkins -> Configure Global Security --> LDAP