diff --git a/roles/ldap/templates/debian-lan.j2 b/roles/ldap/templates/debian-lan.j2 index 562bc77..7523d97 100644 --- a/roles/ldap/templates/debian-lan.j2 +++ b/roles/ldap/templates/debian-lan.j2 @@ -8,7 +8,7 @@ set -eu usage(){ cat < [] [] + $(basename $0) adduser [] [] [] $(basename $0) deluser $(basename $0) delhost $(basename $0) ldapvi @@ -17,6 +17,7 @@ Usage: : User ID (login name) : Password , : LDAP attributes 'givenName' and 'sn'. If omitted, is used. + : If given, the user is added to this posix group, which must already exist. : File containing lines of the form: adduser [] [] @@ -66,6 +67,7 @@ id="$2" pw="${3:-""}" gn="${4:-$2}" sn="${5:-$2}" +grp="${6:-""}" domain="$(hostname -d)" @@ -125,13 +127,15 @@ gidNumber: ${gidNumber} ################################## EOF - cat <&1 \ | sed '/ldap_initialize/d' - cat </dev/null \ + | grep cn: | cut -d ' ' -f2) ; do + cat <