Extending notes how to reset root password

This commit is contained in:
2021-03-24 14:57:29 +01:00
parent 65f8ab8dc8
commit 881d8bbe3f

View File

@@ -139,11 +139,26 @@ step_20() {
step_80_info() { echo -e "Some ldap command notes\n"; } step_80_info() { echo -e "Some ldap command notes\n"; }
step_80_alias() { ALIAS="notes"; } step_80_alias() { ALIAS="notes"; }
step_80() { step_80() {
echo "You can also check LDAP Base DN using the ldapsearch command as shown below" outColor green
echo "ldapsearch -H ldapi:/// -x -LLL -s base -b \"\" namingContexts" cat <<NOTES_EOF
echo # You can also check LDAP Base DN using the ldapsearch command as shown below
echo "To view the RootDN, run the command below" ldapsearch -H ldapi:/// -x -LLL -s base -b "" namingContexts
echo "ldapsearch -H ldapi:/// -Y EXTERNAL -b \"cn=config\" \"(olcRootDN=*)\""
# To view the RootDN, run the command below
ldapsearch -H ldapi:/// -Y EXTERNAL -b "cn=config" "(olcRootDN=*)"
# Reset root password
## Create a password hash {SSHA}....
slappasswd
## Modify olcRootPW
ldapmodify -Q -Y EXTERNAL -H ldapi:/// << E0F
dn: olcDatabase={1}mdb,cn=config
changetype: modify
replace: olcRootPW
olcRootPW: {SSHA}thehashyoucreatedabove
E0F
NOTES_EOF
} }
step_100_info() { echo "Add group <GROUP NAME> <USER ID>"; } step_100_info() { echo "Add group <GROUP NAME> <USER ID>"; }