Oracle Linux/OpenLDAP
From r00tedvw.com wiki
(Difference between revisions)
(→Setup Domain) |
|||
Line 26: | Line 26: | ||
olcSuffix: dc=localhost,dc=localdomain</nowiki> | olcSuffix: dc=localhost,dc=localdomain</nowiki> | ||
Make sure you also update the <code>olcRootDN</code> to match your new domain | Make sure you also update the <code>olcRootDN</code> to match your new domain | ||
− | <nowiki>~$ sudo vim /etc/openldap/slapd.d/cn=config/olcDatabase={2}bdb.ldif | + | <nowiki>~$ sudo vim /etc/openldap/slapd.d/cn=config/olcDatabase={2}bdb.ldif |
... | ... | ||
olcRootDN: cn=ldapadmin,dc=localhost,dc=localdomain</nowiki> | olcRootDN: cn=ldapadmin,dc=localhost,dc=localdomain</nowiki> |
Revision as of 13:43, 12 November 2018
OpenLDAP
Contents |
Overview
Installed on CentOS 6
Installation
~$ sudo yum install -y openldap openldap-clients openldap-servers
Configuration
LDAP User Account
Setup new user account for ldap admin
~$ sudo useradd ldapadmin -d /home/ldapadmin/ -G wheel ~$ sudo passwd ldapadmin
Set as LDAP Admin
Set new admin as LDAP admin
~$ sudo vim /etc/openldap/slapd.d/cn\=config/olcDatabase\=\{2\}bdb.ldif ... olcRootDN: cn=ldapadmin,dc=my-domain,dc=com
Setup LDAP Admin password
Create a SHA hash of the desired password for the ldap admin and add it to the ldap config. The parameter may not exist in the config file, you may need to add it.
~$ slappasswd ~$ sudo vim /etc/openldap/slapd.d/cn=config/olcDatabase={2}bdb.ldif ... olcRootPW: {SSHA}1pgok6qWn24lpBkVreTDboTr81rg4QC6
Setup Domain
~$ sudo vim /etc/openldap/slapd.d/cn=config/olcDatabase={2}bdb.ldif ... olcSuffix: dc=localhost,dc=localdomain
Make sure you also update the olcRootDN
to match your new domain
~$ sudo vim /etc/openldap/slapd.d/cn=config/olcDatabase={2}bdb.ldif ... olcRootDN: cn=ldapadmin,dc=localhost,dc=localdomain
Startup
~$ sudo service slapd start ~$ sudo service slapd status