Last active
October 8, 2015 13:08
-
-
Save altmas5/3336473 to your computer and use it in GitHub Desktop.
short way to set zimbra accounts password pattern when validity expires because of server conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# correr como usuario zimbra | |
# se deja como password el username + contenido de la variable append | |
# se fuerza al usuario a cambiar la contraseña en el próximo inicio de sesión. | |
zmprov -l getAllAccounts > cuentas; | |
append='x0i1*'; | |
for line in $(cat cuentas); | |
do | |
pass=$(echo $line | cut -d@ -f1); | |
pass=$pass$append; | |
zmprov setPassword "$line" "$pass"; | |
zmprov modifyAccount $line zimbraPasswordMustChange TRUE; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment