Changes

Jump to: navigation, search

NAD810 LDAP LAB

1,130 bytes removed, 16:07, 16 November 2016
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)
For ldapuser: /usr/share/openldap/migration/migrate_passwd.pl \ /etc/openldap/entry.ldapuser /etc/openldap/ldif.ldapuser ''' For Fedora 10, replace /usr/share/openldap/migration/migrate_passwdf.pl with /usr/share/migrationtools/migrate_passwdverify the contents of ldif.pl ''' ldapuser
For root: /usr/share/openldap/migration/migrate_passwd.pl \ /etc/openldap/entry.root /etc/openldap/ldif.root ''' For Fedora 10, replace /usr/share/openldap/migration/migrate_passwd.pl with /usr/share/migrationtools/migrate_passwd.pl'''  NesNote: here is a trick, do 'ln /usr/share/openldap/migration/migrate_passwd.pl /usr/sbin/migrate_passwd.pl', so u can call up migrate_passwd.pl in any where. :-) now, u can do.. e. edit ldif.ldapuser (change dc=pad1 to dc=nad810)  dn: uid=ldapuser,ou=People,dc=padlnad810,dc=com
uid: ldapuser
cn: ldapuser
gidNumber: 100
homeDirectory: /home/ldapuser
 
f. edit ldif.root (change dc=pad1 to dc=nad810)
dn: uid=root,ou=People,dc=padl,dc=com
uid: root
cn: root
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword: {crypt}$1$3gRCMQww$8OCADPFZLjFr6DiFUi8Nn1
shadowLastChange: 12759
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 0
gidNumber: 0
homeDirectory: /root
gecos: root
 
g. create an LDIF file (nad810.com.ldif) for the nad810.com domain
<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)
(5) Import LDIF files into the OpenLDAP database
 
''''' NesNote: DO NOT USE double quote ", use single quote ' trust me.. @@ i wasted 2 days because of this..'''''
<pre>
ldapadd -x -D 'cn=Manager,dc=nad810,dc=com' -W -f /etc/openldap/nad810.com.ldif ldapadd -x -D 'cn=Manager,dc=nad810,dc=com' -W -f /etc/openldap/ldif.rootbase
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==
1,760
edits

Navigation menu