Openldap installation :-
Purpose: Installing and configuring openldap
STEPS
1) Packages(rpm) needed
¨ openldap
¨ openldap-clients
¨ openldap-servers
2) Install the packages
3) Edit the following in the file called “/etc/openldap/slapd.conf”
- database bdb
- suffix “dc=example,dc=com”
- rootdn “dn=Manager,dc=example,dc=com”
- rootpw {SSHA}2k3jk232323kl23kjawe
(note: password can generated by this command
“slappassword –s any” just copy and paste it)
- directory /var/lib/ldap
4) mv or cp /etc/openldap/DB_CONFIG.example /var/lib/ldap/DB_CONFIG
5) it is time to prepare and upload a base.ldif
6) cd /usr/share/openldap/migration/
7) vim migrate_common.pl //edit following
- $NAMINGCONTEXT{‘GROUP’} = “ou=group” into “ou=groups”
- $DEFAULT_MAIL_DOMAIN = “example.com”;
- $DEFAULT_BASE = “dc=example,dc=com”;
- $EXTENDED_SCHEMA = 1;
- Save it
8) ./migrate_base.pl > base.ldif
9) upload it: slapadd –l base.ldif //now ldap server is ready to use
10) chown ldap.ldap /var/lib/ldap/* //except one file(DB_CONFIG) which owned by root.ldap
11) start server by service ldap start or /etc/init.d/ldap start
12) add 2 lines in /etc/openldap/ldap.conf
¨ URI ldap://serverx.example.com
¨ BASE dc=example,dc=com
13) verify ldapsearch –x //it will show the list of contents(BASE) which we uploaded
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
No comments:
Post a Comment