summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-01-21 12:59:07 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-01-21 12:59:07 (GMT)
commit94b06ae740812f748761e8589c7678269f004ed9 (patch)
treedbdec8275d0ad701d98272e35925b5982f5c944d
parent7feacdd5446c37a133cafefd66e89edaa33e1daf (diff)
downloadkolab-scripts-94b06ae740812f748761e8589c7678269f004ed9.tar.gz
Exclude service accounts
-rwxr-xr-xpopulate-ldap/99-cleanup-users-and-groups.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/populate-ldap/99-cleanup-users-and-groups.sh b/populate-ldap/99-cleanup-users-and-groups.sh
index 38c3f39..435e4e4 100755
--- a/populate-ldap/99-cleanup-users-and-groups.sh
+++ b/populate-ldap/99-cleanup-users-and-groups.sh
@@ -8,9 +8,9 @@
-h ${ldap_host} \
-D "${ldap_binddn}" \
-w "${ldap_bindpw}" \
- -b "ou=People,${rootdn}" \
- -s one \
- "(objectclass=inetorgperson)" \
+ -b "${rootdn}" \
+ -s sub \
+ "(&(objectclass=inetorgperson)(!(uid=hosted-kolab-service))(!(uid=kolab-service))(!(uid=cyrus-admin)))" \
-LLL \
dn | \
grep ^dn | \
@@ -23,7 +23,7 @@
-h ${ldap_host} \
-D "${ldap_binddn}" \
-w "${ldap_bindpw}" \
- -b "ou=Groups,${rootdn}" \
+ -b "${rootdn}" \
"(|(objectclass=groupofuniquenames)(objectclass=groupofurls))" \
-LLL \
dn | \