Changes

Jump to: navigation, search

OpenLDAP Installation and Test

930 bytes added, 14:00, 23 November 2016
More Resources
-rw-------. 1 ldap ldap 15578 Dec 16 2015 cn={0}core.ldif
</pre>
* Initial contents in the "oldDatabaseolcDatabase={2}hdb.ldif" file:
<pre>
[root@localhost cn=config]# cat olcDatabase\=\{2\}hdb.ldif
</pre>
To use OpenLDAP directory to host Linux user accountaccounts, you need to import three more existing schema: cosine, nis, and inetorgperson for the slapd server. You also need to update the following fields in the "olcDatabase={2}hdb.ldif" file:
* olcSuffix - update to reflect your base context (or naming context)
* olcRootDN - update to match your naming context
* olcRootPW - add password for authenticating the Directory Server Manager (for i.e. olcRootDN)
== Start slapd and add additional schema ==
</pre>
== Changing the "naming context" i.e. olcSuffix, and update the olcRootDN and olcRootPW==
Create the following LDIF file and name it "newbase.ldif:
<pre>
# cutomize domain name
dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcSuffix
olcSuffix: dc=ops535,dc=com
 
dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcRootDN
olcRootDN: cn=Manager,dc=ops535,dc=com
 
dn: olcDatabase={2}hdb,cn=config
changetype: modify
add: olcRootPW
olcRootPW: {SSHA}1Di4Suea6ojE2bFxJhLDScjQyQ97GSef
</pre>
 
Run the following command to preform the update:
<pre>
ldapmodify -Y EXTERNAL -H ldapi:/// -f newbase.ldif
</pre>
Check the content of the file /etc/openldap/slapd.d/cn=config/olcDatabase={2}hdb.ldif to confirm.
== Important LDAP Commands and Sample LDIF files ==
* Base LDIF filefor the base entry* LDIF file for new POSIX User account fileaccounts
* ldapadd, ldapsearch, ldapdelete command
[http://www.oracle.com/technology/documentation/berkeley-db/db/ref/toc.html Berkeley DB Reference Guide (Version: 4.6.21) ]
[[Category:OPS535]]
 
<b>OID</b>
* [http://www.iana.org/assignments/enterprise-numbers/enterprise-numbers Private Enterprise OID registry]
1,760
edits

Navigation menu