Created
October 29, 2014 19:49
Create random password for every Drupal user from uid 1 to uid 45
This file contains hidden or 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
# | |
# Create random password for every Drupal user from uid 1 to uid 45 | |
# @todo - variable user ID sequence? | |
# | |
for uid in $(seq 45); do uname=$(drush user-information $uid 2>/dev/null | grep -oP "(?<=User name \: ).+"); if [ -n "${uname}" ]; then drush user-password "$uname" --password=$(date | md5sum); fi done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment