mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
Use ldapadd instead of slapadd.
This commit is contained in:
parent
b2cd67c78b
commit
aece3d7ee0
@ -19,8 +19,7 @@
|
|||||||
username="$1"
|
username="$1"
|
||||||
password="$2"
|
password="$2"
|
||||||
|
|
||||||
service slapd stop
|
cat <<EOF |ldapadd -x -D 'cn=admin,dc=thisbox' -w $(cat /var/lib/plinth/ldap-admin)
|
||||||
cat <<EOF |slapadd
|
|
||||||
dn: uid=$username,ou=users,dc=thisbox
|
dn: uid=$username,ou=users,dc=thisbox
|
||||||
objectClass: inetOrgPerson
|
objectClass: inetOrgPerson
|
||||||
uid: $username
|
uid: $username
|
||||||
@ -28,4 +27,8 @@ sn: $username
|
|||||||
cn: $username
|
cn: $username
|
||||||
userPassword: $password
|
userPassword: $password
|
||||||
EOF
|
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