Use variable LDAPURL instead of hardcoded

This commit is contained in:
2025-03-16 17:30:58 +08:00
parent 4a7b700045
commit 2137d20385
4 changed files with 4 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ GIDNUMBER_MAX=10000
if [ "$GIDNUMBER" -lt "$GIDNUMBER_MIN" ]; then echo "Refusing to add group below $GIDNUMBER_MIN"; exit 32; fi
if [ "$GIDNUMBER" -gt "$GIDNUMBER_MAX" ]; then echo "Refusing to add group above $GIDNUMBER_MAX"; exit 32; fi
ldapadd -D "$BIND" -w "$PASS" -H ldapi:/// <<-LDIF
ldapadd -D "$BIND" -w "$PASS" -H "$LDAPURL" <<-LDIF
dn: cn=$USERNAME,$USER_BASEDN
objectClass: posixAccount
objectClass: inetOrgPerson