Add new comment
Step-by-step OpenLDAP Installation and ConfigurationStep-by-step OpenLDAP Installation and ConfigurationThis tutorial describes how to install and configure an OpenLDAP server and also an OpenLDAP client. Step by Step Installation and Configuration OpenLDAP ServerSoftware: OS-Cent OS 4.4, openldap 2.2.13-6.4E Note: Use your domain name and IP instead of adminmart. Easy steps for adding users: Step #1. Requirements compat-openldap.i386 0:2.1.30-6.4E You can install them using the command: yum install *openldap* -y
Step #2. Start the service[root@ldap ~]# chkconfig --levels 235 ldap on Step #3. Create LDAP root user password[root@ldap ~]# slappasswd Step #4. Update /etc/openldap/slapd.conf for the root password[root@ldap ~]# vi /etc/openldap/slapd.conf #68 database bdb
#69 suffix "dc=adminmart,dc=com"
#70 rootdn "cn=Manager,dc=adminmart,dc=com"
#71 rootpw {SSHA}cWB1VzxDXZLf6F4pwvyNvApBQ8G/DltW
Step #5. Apply Changes[root@ldap ~]# service ldap restart Step #6. Create test users[root@ldap ~]# useradd test1 Note: Repeat the same for the rest of users Step #7. Migrate local users to LDAP[root@ldap ~]# grep root /etc/passwd > /etc/openldap/passwd.root Note: Repeat the same for the rest of users Step #8. Update default settings on file /usr/share/openldap/migration/migrate_common.ph#71 $DEFAULT_MAIL_DOMAIN = "adminmart.com"; #74 $DEFAULT_BASE = "dc=adminmart,dc=com"; Step #9. Convert passwd.file to ldif (LDAP Data Interchange Format) file[root@ldap ~]# /usr/share/openldap/migration/migrate_passwd.pl /etc/openldap/passwd.root /etc/openldap/root.ldif Note: Repeat the same for the rest of users Step #10. Update root.ldif file for the "Manager" of LDAP Server[root@ldap ~]# vi /etc/openldap/root.ldif #1 dn: uid=root,ou=People,dc=adminmart,dc=com #2 uid: root #3 cn: Manager #4 objectClass: account Step #11. Create a domain ldif file (/etc/openldap/adminmart.com.ldif)[root@ldap ~]# cat /etc/openldap/adminmart.com.ldif dn: dc=adminmart,dc=com dc: adminmart description: LDAP Admin objectClass: dcObject objectClass: organizationalUnit ou: rootobject dn: ou=People, dc=adminmart,dc=com ou: People description: Users of adminmart objectClass: organizationalUnit Step #12. Import all users in to the LDAPAdd the Domain ldif file [root@ldap ~]# ldapadd -x -D "cn=Manager,dc=adminmart,dc=com" -W -f /etc/openldap/adminmart.com.ldif Add the users: [root@ldap ~]# ldapadd -x -D "cn=Manager,dc=adminmart,dc=com" -W -f /etc/openldap/root.ldif Note: Repeat the same for the rest of users Step #13. Apply Changes[root@ldap ~]# service ldap restart Step #14. Test LDAP ServerIt prints all the user information: [root@ldap ~]# ldapsearch -x -b 'dc=adminmart,dc=com' '(objectclass=*)'
Reply |



Recent comments
10 hours 34 min ago
15 hours 23 min ago
20 hours 12 min ago
22 hours 32 min ago
22 hours 49 min ago
23 hours 52 sec ago
1 day 3 hours ago
1 day 3 hours ago
1 day 6 hours ago
1 day 13 hours ago