Skip to content

Instantly share code, notes, and snippets.

@gwillem
Created March 4, 2019 09:42
Show Gist options
  • Save gwillem/efc3875f38bc2efca6082fc3170b7bc9 to your computer and use it in GitHub Desktop.
Save gwillem/efc3875f38bc2efca6082fc3170b7bc9 to your computer and use it in GitHub Desktop.
Enforce new passwords for all Magento1 staff users
# 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