mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
Use ldapadd instead of slapadd.
This commit is contained in:
parent
b2cd67c78b
commit
aece3d7ee0
@ -19,8 +19,7 @@
|
||||
username="$1"
|
||||
password="$2"
|
||||
|
||||
service slapd stop
|
||||
cat <<EOF |slapadd
|
||||
cat <<EOF |ldapadd -x -D 'cn=admin,dc=thisbox' -w $(cat /var/lib/plinth/ldap-admin)
|
||||
dn: uid=$username,ou=users,dc=thisbox
|
||||
objectClass: inetOrgPerson
|
||||
uid: $username
|
||||
@ -28,4 +27,8 @@ sn: $username
|
||||
cn: $username
|
||||
userPassword: $password
|
||||
EOF
|
||||
service slapd start
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to create user"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user