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_alias() { ALIAS="notes"; }
|
||||
step_80() {
|
||||
echo "You can also check LDAP Base DN using the ldapsearch command as shown below"
|
||||
echo "ldapsearch -H ldapi:/// -x -LLL -s base -b \"\" namingContexts"
|
||||
echo
|
||||
echo "To view the RootDN, run the command below"
|
||||
echo "ldapsearch -H ldapi:/// -Y EXTERNAL -b \"cn=config\" \"(olcRootDN=*)\""
|
||||
outColor green
|
||||
cat <<NOTES_EOF
|
||||
# You can also check LDAP Base DN using the ldapsearch command as shown below
|
||||
ldapsearch -H ldapi:/// -x -LLL -s base -b "" namingContexts
|
||||
|
||||
# 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>"; }
|
||||
|
Reference in New Issue
Block a user