4
0
Fork 0
ldap-admin/bin/create-posix-group

19 lines
379 B
Bash
Executable File

#!/bin/bash
#% create-posix-group name gid
#% Creates a posix group with name and gid
. $LIB_DIR/common.sh
tag-begin "Create group $1 (gid: $2)"
push <<EOF
dn: cn=$1,ou=Group,dc=hackerspace,dc=pl
changetype: add
objectClass: groupOfUniqueNames
objectClass: posixGroup
cn: $1
gidNumber: $2
userPassword: {crypt}x
uniqueMember: uid=$1,ou=People,dc=hackerspace,dc=pl
EOF
tag-end