Forked from arnathan2k/Open LDAP change Admin password
Created
October 14, 2023 06:14
-
-
Save gattacker/3d85c88635b8843761f02497cd5883e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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