Created
March 4, 2019 09:42
-
-
Save gwillem/efc3875f38bc2efca6082fc3170b7bc9 to your computer and use it in GitHub Desktop.
Enforce new passwords for all Magento1 staff users
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
# Requires n98-magerun | |
n98-magerun admin:user:list --format=csv | grep ,active | while read row; | |
do | |
user=$(echo $row | cut -d, -f2) | |
pass=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w10 | head -n1) | |
echo "$user -> $pass" | |
n98-magerun admin:user:change-password $user $pass >/dev/null | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment