LDAP Tips

Benutzerkonten ändern

shell auf false setzen

if [ $# != 1 ]; then 
  echo "$0: usage: $0 USERNAME"
  exit 1
fi

CHUSER_NOLOGIN_USERNAME=$1

source credentials.sh
# BASE_DOMAIN=
# BASE_TLD=
# LDAP_IP=
# LDAP_USER=
# LDAP_PASS=

cat << EOF | ldapmodify -x -h $LDAP_IP -D cn=$LDAP_USER,dc=$BASE_DOMAIN,dc=$BASE_TLD -w $LDAP_PASS
dn: uid=$CHUSER_NOLOGIN_USERNAME,ou=Benutzer,dc=$BASE_DOMAIN,dc=$BASE_TLD
changetype: modify
replace: loginShell
loginShell: /bin/false
EOF

LDAP (last edited 2012-03-05 23:03:02 by static-087-245-051-201-teleos)