Change password to all my accounts

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Posts: 2
Joined: Thu Jul 13, 2017 9:25 pm

Change password to all my accounts

Postby lcuadros » Wed Sep 13, 2017 9:40 pm

Hello there.

i wanna change all the passwords of my account mails to one, i need to migrate the data to a new host.


User avatar
Posts: 7
Joined: Mon Apr 17, 2017 4:45 am

Re: Change password to all my accounts

Postby rioprayoga » Thu Sep 14, 2017 7:42 am

You can use this script for change password all account.

Code: Select all

USERS=`su – zimbra -c ‘zmprov -l gaa’`;
for ACCOUNT in $USERS; do
ACC1=`echo $ACCOUNT | awk -F@ ‘{print $1}’`;
ACC=`echo $ACC1 | cut -d ‘.’ -f1`;
if [ $ACC == "admin" ] || [ $ACC == "wiki" ] || [ $ACC == "galsync" ] || [ $ACC == "ham" ] || [ $ACC == "spam" ]; then
echo “Skipping system account, $NAME…”;
echo “Modifying $ACCOUNT password…”;
su – zimbra -c “zmprov sp $ACCOUNT NewGeneratedPassword”;
su – zimbra -c “zmprov ma $ACCOUNT zimbraPasswordMustChange TRUE;
echo “Done!”
echo “”
# read anykey
echo “Modifying password for all user has been finished successfully”

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 10 guests