Open LDAP

From Cramsession
Jump to navigationJump to search
✍️ Verified Author: MflavellClick to view professional profile & credentials

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'