Setting a default Linux password

I have a handful of Linux users that I needed to set a default password for. In addition I wanted that password to expire as soon as they login the first time, and then ask for an updated password. Here is a quick bash command to do just that:

for i in user1 user2 user3 user4; do echo "iheartfirefly" | passwd --stdin $i ; chage -d0 $i ; done


Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 18.209.209.246
To prevent spam please submit by clicking the kitten: