Created
May 1, 2012 07:07
-
-
Save mehulved/2565856 to your computer and use it in GitHub Desktop.
Change password for all the users in the system
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
#!/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