diff --git a/bin/add-dn-to-group b/bin/add-dn-to-group new file mode 100755 index 0000000..443a104 --- /dev/null +++ b/bin/add-dn-to-group @@ -0,0 +1,11 @@ +#!/bin/bash +#% add-dn-to-group dn group +#% Add dn to group. group should be a groupOfUniqueNames +. $LIB_DIR/common.sh +if [[ $# < 2 ]]; then + show-usage + exit 1 +fi +tag-begin "Add DN $1 to group $2" +basic-attr-op add $2 uniqueMember $1 +tag-end diff --git a/bin/add-dn-to-ldap-group b/bin/add-dn-to-ldap-group deleted file mode 100755 index e705b36..0000000 --- a/bin/add-dn-to-ldap-group +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -#% add-dn-to-ldap-group dn group -#% Add dn to group. group should be a regular LDAP groupOfNames -. $LIB_DIR/common.sh -if [[ $# < 2 ]]; then - show-usage - exit 1 -fi -tag-begin "Add DN $1 to group $2" -basic-attr-op add $2 member $1 -tag-end diff --git a/bin/add-to-posix-group b/bin/add-to-posix-group deleted file mode 100755 index 4f33756..0000000 --- a/bin/add-to-posix-group +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -#% add-to-posix-group login group -#% Add user (identified by login) to group. group should be a posixGroup -. $LIB_DIR/common.sh -if [[ $# < 2 ]]; then - show-usage - exit 1 -fi -tag-begin "Add user $1 to posix group $2" -basic-attr-op add "$2" memberUid "$1" -tag-end diff --git a/bin/add-to-wiki b/bin/add-to-wiki index a2c221c..a682708 100755 --- a/bin/add-to-wiki +++ b/bin/add-to-wiki @@ -1,4 +1,4 @@ #!/bin/bash #% add-to-wiki user #% Give user access to wiki. -add-user-to-ldap-group $1 'cn=wikiuser,ou=Group,dc=hackerspace,dc=pl' +add-user-to-group $1 'cn=wikiuser,ou=Group,dc=hackerspace,dc=pl' diff --git a/bin/add-user-to-ldap-group b/bin/add-user-to-group similarity index 60% rename from bin/add-user-to-ldap-group rename to bin/add-user-to-group index 9484540..0d58f8b 100755 --- a/bin/add-user-to-ldap-group +++ b/bin/add-user-to-group @@ -1,9 +1,9 @@ #!/bin/bash -#% add-user-to-ldap-group login groupdn +#% add-user-to-group login groupdn #% Add user with login=login to group groupdn. groupdn should be a regular LDAP groupOfNames . $LIB_DIR/common.sh if [[ $# < 2 ]]; then show-usage exit 1 fi -add-dn-to-ldap-group "uid=$1,ou=People,dc=hackerspace,dc=pl" "$2" +add-dn-to-group "uid=$1,ou=People,dc=hackerspace,dc=pl" "$2" diff --git a/bin/create-posix-group b/bin/create-posix-group index a9ad845..9a86fef 100755 --- a/bin/create-posix-group +++ b/bin/create-posix-group @@ -7,6 +7,7 @@ tag-begin "Create group $1 (gid: $2)" push <