4
0
Fork 0

Switch base of wiki user group.

master
Maciej Grela 2012-11-20 00:02:00 +01:00
parent 78ee7b1725
commit 57bae896c8
2 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#% add-to-wiki user
#% Give user access to wiki.
add-user-to-ldap-group $1 'cn=user,dc=wiki,dc=hackerspace,dc=pl'
add-user-to-ldap-group $1 'cn=wiki-user,ou=Group,dc=hackerspace,dc=pl'

7
bin/list-ldap-group Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
#% list-ldap-group
#% List the DNs inside given LDAP groups
while [ "$1" ]; do
ldapsearch -x -ZZ -b "cn=$1,ou=Group,dc=hackerspace,dc=pl" | grep ^member: | awk '{print $2;}'
shift;
done