diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2012-09-22 13:46:32 (GMT) |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2012-09-22 13:46:32 (GMT) |
commit | 37625feabd913c5ab38d1d298410301219f40e67 (patch) | |
tree | fa42fc8cb1b651b736ce4e4310c3bf34bcf63463 /utils/reset-user-passwords.sh | |
parent | 0359f9cd4d708da6cdb70cb0edea5e72b4bdbfa0 (diff) | |
download | kolab-scripts-37625feabd913c5ab38d1d298410301219f40e67.tar.gz |
Add some more utils
Diffstat (limited to 'utils/reset-user-passwords.sh')
-rwxr-xr-x | utils/reset-user-passwords.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/reset-user-passwords.sh b/utils/reset-user-passwords.sh new file mode 100755 index 0000000..09bb4a5 --- /dev/null +++ b/utils/reset-user-passwords.sh @@ -0,0 +1,14 @@ +#!/bin/bash + + . ./settings.sh + +ldapsearch -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" -b "ou=People,${rootdn}" -LLL "(objectclass=kolabinetorgperson)" entrydn | grep ^dn: | cut -d':' -f2 | while read dn; do + ( + echo "dn: ${dn}" + echo "changetype: modify" + echo "replace: userpassword" + echo "userpassword: ${default_user_password}" + echo "" + ) | ldapmodify -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" +done + |