Openldap installation

Quota of Linux is designed per user count.

yum install openldap openldap-servers openldap-clients

install package

vi /etc/openldap/slapd.conf database bdb suffix "dc=sohealthcare,dc=com" rootdn "cn=Manager,dc=sohealthcare,dc=com" rootpw "entinux" password-hash {SSHA} sizelimit 5000

Edit ldap server setting

cat /etc/openldap/DB_CONFIG.example | grep -v '#' | grep .
cat /etc/openldap/DB_CONFIG.example | grep -v '#' | grep . > /var/lib/ldap/DB_CONFIG
chown ldap:ldap /var/lib/ldap/DB_CONFIG
chattr +i /var/lib/ldap/DB_CONFIG

set basic db config

/etc/init.d/ldap restart
chkconfig ldap on

start service

vi /root/abook.ldif
dn: ou=addressbook,dc=sohealthcare,dc=com
objectClass: top
objectClass: organizationalUnit
ou: addressbook

vi /root/init.ldif
dn: dc=sohealthcare,dc=com
objectClass: dcObject
objectClass: organization
o: sohealthcare
dc: sohealthcare

ldapadd -x -D 'cn=manager,dc=sohealthcare,dc=com' -W -f init.ldif
ldapadd -x -D 'cn=manager,dc=sohealthcare,dc=com' -W -f abook.ldif
slapcat

To add ou, dn, dc for basic addressbook ldap

vi /etc/openldap/schema/core.schema objectclass ( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP top STRUCTURAL MUST ( sn $ cn ) --> MUST ( cn ) /etc/init.d/ldap restart

To change the new record limitation for 'cn' only

vi /root/test.ldif
dn: mail=test@sohealthcare.com,ou=addressbook,dc=sohealthcare,dc=com
objectClass: top
objectClass: inetOrgPerson
cn: test@sohealthcare.com
mail: test@sohealthcare.com

ldapadd -x -D 'cn=manager,dc=sohealthcare,dc=com' -W -f test.ldif
slapcat

To add the first ldap record



Server is hosted by Alanstudio
Linux Operating System

Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.