Skip to content

Instantly share code, notes, and snippets.

@altmas5
Last active October 8, 2015 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save altmas5/3336473 to your computer and use it in GitHub Desktop.
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
#!/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