1,760
edits
Changes
→Part 1 - OpenLDAP server setup and configuration
passwd ldapuser
b. extract the passwd entry of ldapuser from /etc/passwd to a file called "entry.ldapuser"to your current working directory: grep ldapuser /etc/passwd > /etc/openldap/entry.ldapuser
c. extract Modify the passwd entry of root from /etc/passwd migration tools configuration file to a file called use our base context "dc=nad810,dc=com"entry.root" grep root Back up the file /etcusr/passwd > share/etcmigrationtools/openldap/entrymigrate_common.ph and edit: Line 71: $DEFAULT_MAIL_DOMAIN = "padl.com"; to "nad810.rootcom" Line 74: $DEFAULT_BASE = "dc=padl,dc=com"; to "dc=nad810,dc=com" Line 90: $EXTENDED_SCHEMA = 0; to 1
d. create the base context LDIF file for the nad810.com domain and named it ldif.base<pre> dn: dc=nad810,dc=com dc: nad810 description: root LDAP entry for nad810 objectClass: dcObject objectClass: organizationalUnit ou: rootobject dn: ou=People, dc=nad810, dc=com ou: People description: All people in nad810 objectClass: organizationalUnit</pre> (Make sure that you have a blank line before the 2nd "dn:" line) e. convert the entries for the "ldapuser" and "root" to LDIF format (ldif.ldapuser and ldif.root):
(Note that "\" at the end of the line is used to tell the shell that
the next line as a continuation of the current line)
uid: ldapuser
cn: ldapuser
gidNumber: 100
homeDirectory: /home/ldapuser
(5) Import LDIF files into the OpenLDAP database
<pre>
ldapadd -x -D 'cn=Manager,dc=nad810,dc=com' -W -f /etc/openldap/ldif.ldapuser
</pre>
(6)
cp /usr/share/doc/openldap-servers-2.4.12/DB_CONFIG.example /var/lib/ldap/nad810.comDB_CONFIG mv DB_CONFIGsystemctl restart slapd.example DB_CONFIG service ldap restart
==Part 2 - Setup and configure OpenLDAP Client==