Инструменты пользователя

Инструменты сайта


установка_и_настройка_openldap

Это старая версия документа.


Установка и настройка OpenLDAP

Установка, настройка и запуск ldap сервера

FreeBSD

[server:~] # pkg_add -r openldap24-server

[server:~] # cat /usr/local/etc/openldap/slapd.conf
...
include         /usr/local/etc/openldap/schema/core.schema
include         /usr/local/etc/openldap/schema/cosine.schema
include         /usr/local/etc/openldap/schema/nis.schema
...
suffix                "dc=corpX,dc=un"
rootdn                "cn=admin,dc=corpX,dc=un"
...
[server:~] # cat /etc/rc.conf
...
slapd_enable="YES"
[server:~] # /usr/local/etc/rc.d/slapd start

[server:~] # rehash

CentOS

[root@server ~]# yum install openldap-servers openldap-clients

Далее как в FreeBSD /etc/openldap/slapd.conf

Ubuntu (12.04)

https://help.ubuntu.com/12.04/serverguide/openldap-server.html

root@server:~# apt-get install slapd ldap-utils

Administrative password: secret

root@server:~# ldapsearch -x -LLL -H ldap:/// -b dc=corp5,dc=un dn

Ubuntu (10.04)

http://doc.ubuntu.com/ubuntu/serverguide/C/openldap-server.html

root@server:~# apt-get install slapd ldap-utils

root@server:~# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif
root@server:~# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif

root@server:~# cat config.ldif
# Load dynamic backend modules
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/ldap
olcModuleload: back_hdb

# Database settings
dn: olcDatabase=hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcSuffix: dc=corpX,dc=un
olcDbDirectory: /var/lib/ldap
olcRootDN: cn=admin,dc=corpX,dc=un
olcRootPW: secret
olcDbIndex: objectClass eq
olcLastMod: TRUE
olcAccess: to attrs=userPassword by dn="cn=admin,dc=corpX,dc=un" write by anonymous auth by self write by * none
olcAccess: to attrs=shadowLastChange by self write by * read
olcAccess: to dn.base="" by * read
olcAccess: to * by dn="cn=admin,dc=corpX,dc=un" write by * read
root@server:~# ldapadd -Y EXTERNAL -H ldapi:/// -f config.ldif
установка_и_настройка_openldap.1354020520.txt.gz · Последние изменения: 2013/05/22 13:50 (внешнее изменение)