Extending notes how to reset root password
This commit is contained in:
25
seqs/ldap.sh
25
seqs/ldap.sh
@@ -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>"; }
|
||||||
|
Reference in New Issue
Block a user