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:
James Valleroy 2016-06-06 19:00:13 -04:00
parent ad61028a3a
commit 7470f64d06
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -24,13 +24,6 @@ fi
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()
{
@ -79,14 +72,7 @@ set_user_password()
username="$1"
password=$(slappasswd -s "$2")
# XXX: Use ldapsetpasswd as soon as ldapscripts can handle
# 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
ldapsetpasswd "$username" "$password"
}