mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
Clean up ldapscript workarounds
These were for issues that have now been fixed: https://github.com/martymac/ldapscripts/issues/3 https://github.com/martymac/ldapscripts/issues/5
This commit is contained in:
parent
ad61028a3a
commit
7470f64d06
16
actions/ldap
16
actions/ldap
@ -24,13 +24,6 @@ fi
|
|||||||
|
|
||||||
set -e # Exit on failure
|
set -e # Exit on failure
|
||||||
|
|
||||||
# XXX: ldapscripts has an issue that it can't properly extract
|
|
||||||
# built-in templates under certain locales due to grep command
|
|
||||||
# recognizing the source file as binary. Remove using this once the
|
|
||||||
# bug is fixed. Passing '-a' as argument to grep seems to be a
|
|
||||||
# solution.
|
|
||||||
export LC_ALL=C
|
|
||||||
|
|
||||||
|
|
||||||
create_user()
|
create_user()
|
||||||
{
|
{
|
||||||
@ -79,14 +72,7 @@ set_user_password()
|
|||||||
username="$1"
|
username="$1"
|
||||||
password=$(slappasswd -s "$2")
|
password=$(slappasswd -s "$2")
|
||||||
|
|
||||||
# XXX: Use ldapsetpasswd as soon as ldapscripts can handle
|
ldapsetpasswd "$username" "$password"
|
||||||
# changing passwords with SASL auth EXTERNAL.
|
|
||||||
cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:/// > /dev/null
|
|
||||||
dn: uid=$username,ou=Users,dc=thisbox
|
|
||||||
changetype: modify
|
|
||||||
replace: userPassword
|
|
||||||
userPassword: $password
|
|
||||||
EOF
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user