Is it possible to remove the "Must Change Password" at next login tick for all users with one command? If so please help!
Is it possible to remove the "Must Change Password" at next login tick for all users with one command? If so please help!
from this thread [SOLVED] Force password change for ALL accounts
I bet if you change the option to FALSE it will disable the change password at next login option...so it would be :
for each in `zmprov gaa`; do zmprov ma $each zimbraPasswordMustChange FALSE; done
I tried that but it doesnt seem to be working for me. I don't think i'm enough of a linux guru to understand that bash thing, where to type it and under what user. all that good stuff hah.
Just in case you still need it, or will need it in the future...
You can make a bulk change of any attribute. For example ./bulkAccountAttributeChange.sh zimbraPasswordMustChange FALSE#!/bin/bash
# Script for setting the zimbraPasswordMustChange attribute enable or disable
zmprov gaa > accountsList.txt
while read user
do
echo $user
zmprov ma $user $1 $2
done < accountsList.txt
rm accountsList.txt
Here's a new script in case someone has problems running the previous one, it takes almost 3 seconds per user, so plan your changes proactively in case you have to leave this running.
#!/bin/bash
# Script for setting the zimbraPasswordMustChange attribute enable or disable
/opt/zimbra/bin/zmprov -l gaa > accountsList.txt
while read user
do
echo $user
/opt/zimbra/bin/zmprov -l ma $user $1 $2
done < accountsList.txt
rm accountsList.txt
There are currently 1 users browsing this thread. (0 members and 1 guests)