This is an old revision of the document!
[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
[root@server ~]# yum install openldap-servers openldap-clients Далее как в FreeBSD /etc/openldap/slapd.conf
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=corpX,dc=un dn
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