openLDAP on centOS 6

      No Comments on openLDAP on centOS 6
login as: root
[email protected]'s password:
Last login: Sat Sep 29 17:12:56 2012
[[email protected] ~]# vi /etc/hosts
add this line --> 127.0.0.1   ldap.rgiapratama.net
[[email protected] ~]# ping ldap.rgiapratama.net
PING ldap.rgiapratama.net (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=1.88 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.113 ms
^C
--- ldap.rgiapratama.net ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1336ms
rtt min/avg/max/mdev = 0.113/0.998/1.884/0.886 ms
[[email protected] ~]# yum install openldap*
Loaded plugins: fastestmirror
base                      76% [===========    ]  0.0 B/s | 2.9 kB     --:-- ETA
base/primary_db            0% [               ]  0.0 B/s | 4.3 kB     --:-- ETA
base/primary_db            0% [               ] 4.6 kB/s |  10 kB     12:53 ETA
base/primary_db            0% [               ] 3.7 kB/s |  10 kB     16:07 ETA
base/primary_db            0% [               ] 3.0 kB/s |  10 kB     20:10 ETA
base/primary_db            0% [               ] 2.4 kB/s |  10 kB     25:13 ETA
...
  Cleanup        : nspr-4.8.6-1.el6.i686                                  24/26
  Cleanup        : nss-softokn-freebl-3.12.7-1.1.el6.i686                 25/26
  Cleanup        : openldap-2.4.19-15.el6.i686                            26/26
Installed:
  openldap-clients.i686 0:2.4.23-26.el6_3.2
  openldap-devel.i686 0:2.4.23-26.el6_3.2
  openldap-servers.i686 0:2.4.23-26.el6_3.2
  openldap-servers-sql.i686 0:2.4.23-26.el6_3.2
Dependency Installed:
  nss-tools.i686 0:3.13.5-1.el6_3         portreserve.i686 0:0.0.4-9.el6
Updated:
  curl.i686 0:7.19.7-26.el6_2.4        openldap.i686 0:2.4.23-26.el6_3.2
Dependency Updated:
  libcurl.i686 0:7.19.7-26.el6_2.4    libcurl-devel.i686 0:7.19.7-26.el6_2.4
  nspr.i686 0:4.9.1-2.el6_3           nss.i686 0:3.13.5-1.el6_3
  nss-softokn.i686 0:3.12.9-11.el6    nss-softokn-freebl.i686 0:3.12.9-11.el6
  nss-sysinit.i686 0:3.13.5-1.el6_3   nss-util.i686 0:3.13.5-1.el6_3
Complete!
[[email protected] ~]# vi /etc/openldap/ldap.conf
[[email protected] ~]# slappasswd
New password:
Re-enter new password:
{SSHA}LKuJ/b5ybvCnXvAK2FFqIeYS1/lOndfp
[[email protected] ~]# vi /etc/openldap/slapd.conf
[[email protected] ~]# slaptest -uf /etc/openldap/slapd.conf
config file testing succeeded
[[email protected] ~]# mv /etc/openldap/slapd.d /etc/openldap/slapd.d.old
[[email protected] ~]# mkdir /etc/openldap/slapd.d
[[email protected] ~]# slapcat -f /etc/openldap/slapd.conf -F /etc/openldap/slap.d -n 0
[[email protected] ~]# chown -R ldap:ldap /etc/openldap/slapd.d
[[email protected] ~]# chmod 700 /etc/openldap/slapd.d
[[email protected] ~]# cp `rpm -q1 openldap-servers | grep DB_CONFIG` /var/lib/ldap/DB_CONFIG
[[email protected] ~]# chown -R ldap:ldap /var/lib/ldap
[[email protected] ~]# chmod 700 /var/lib/ldap
[[email protected] ~]# slaptest -u
[[email protected] ~]# service slapd start
[[email protected] ~]#  netstat -alnt | grep :389
tcp        0      0 0.0.0.0:389                 0.0.0.0:*                   LISTEN
tcp        0      0 :::389                      :::*                        LISTEN
[[email protected] ~]# ldapwhoami -WD cn=root,dc=rgiapratama,dc=net
Enter LDAP Password:
dn:cn=root,dc=rgiapratama,dc=net
[[email protected] ~]#

Config file :
ldap.conf
slapd.conf

Reference :
http://itdavid.blogspot.ca/2012/05/howto-centos-6.html
http://www.nodeofcrash.com/?p=481

Comments

comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.