Open LDAP: Difference between revisions
From Cramsession
Jump to navigationJump to search
✍️ Verified Author: Mflavell • Click to view professional profile & credentials
(Created page with "= Creating and ADMIN user = == Generate a SHA password == slappasswd provide password Save the resulting SHA == Create the LDIF File == Create a file in nano dn: uid=adminuser,dc=southbaytechnology,dc=com objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: person cn: Admin User sn: User uid: admin userPassword: {SSHA}7x6qOrJlHQI+mONuYn+W2HTG/xHQVEL2 == Add the user == ldapadd -x -W -D "cn=admin,dc=southbaytechnology,dc=com" -f admi...") |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 30: | Line 30: | ||
=== Create LDIF File === | === Create LDIF File === | ||
dn: olcDatabase={1} | dn: olcDatabase={1}mdb,cn=config | ||
changetype: modify | changetype: modify | ||
replace: olcRootDN | replace: olcRootDN | ||
| Line 38: | Line 38: | ||
ldapmodify -Y EXTERNAL -H ldapi:/// -f rootdn_change.ldif | ldapmodify -Y EXTERNAL -H ldapi:/// -f rootdn_change.ldif | ||
== If you have problems == | |||
Check the config: | |||
ldapsearch -H ldapi:/// -Y EXTERNAL -b 'cn=config' | |||
Latest revision as of 05:47, 23 September 2025
Creating and ADMIN user
Generate a SHA password
slappasswd
provide password
Save the resulting SHA
Create the LDIF File
Create a file in nano
dn: uid=adminuser,dc=southbaytechnology,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
cn: Admin User
sn: User
uid: admin
userPassword: {SSHA}7x6qOrJlHQI+mONuYn+W2HTG/xHQVEL2
Add the user
ldapadd -x -W -D "cn=admin,dc=southbaytechnology,dc=com" -f admin.ldif
Grant Admin Rights
Create LDIF File
dn: olcDatabase={1}mdb,cn=config
changetype: modify
replace: olcRootDN
olcRootDN: uid=adminuser,dc=southbaytechnology,dc=com
Save changes
ldapmodify -Y EXTERNAL -H ldapi:/// -f rootdn_change.ldif
If you have problems
Check the config:
ldapsearch -H ldapi:/// -Y EXTERNAL -b 'cn=config'