Skip to content

Instantly share code, notes, and snippets.

@arnathan2k
Created October 8, 2019 20:17
Show Gist options
  • Save arnathan2k/a6d4f0db97bac5750dc670f92f9b4018 to your computer and use it in GitHub Desktop.
Save arnathan2k/a6d4f0db97bac5750dc670f92f9b4018 to your computer and use it in GitHub Desktop.
1. Find slapd
>> locate slapd
2. Find user activity in slapd.log
>> grep -i username101 slapd.log
3. Get the Root Credentials
>> ldapsearch -LLL -Y EXTERNAL -H ldapi:/// -b cn=config olcRootDN=cn=admin,dc=com,dc=example dn olcRootDN olcRootPW
4. Create slapd pasword
>> slappasswd -h {SHA}
5. create ldif file changepwd
dn: olcDatabase={2}bdb,cn=config
#olcRootDN: cn=admin,dc=com,dc=example
changetype: modify
replace: olcRootPW
olcRootPW: {SHA} lfkrqwerhweir09qwe9ruwuq3er4 (create your own) using step 4
5. Modify Admin password
>> ldapmodify -H ldapi:// -Y EXTERNAL -f ./changepwd.ldif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment