Skip to content

Instantly share code, notes, and snippets.

@mehulved
Created May 1, 2012 07:07
Show Gist options
  • Save mehulved/2565856 to your computer and use it in GitHub Desktop.
Save mehulved/2565856 to your computer and use it in GitHub Desktop.
Change password for all the users in the system
#!/usr/bin/env bash
PASS="mypass"
for USER in `awk -F: '{print $1}' /etc/passwd`
do
echo $USER:$PASS >> user_list
done
cat user_list | chpasswd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment