# passwd renu Changing password for userrenu. New password: BAD PASSWORD: The password contains the usernamein some form Retype new password: passwd: all authentication tokens updated successfully.
#!/bin/bash for server in `cat server-list.txt` do ssh [email protected]$server'passwd --stdin renu <<EOF new_passwd new_passwd EOF'; done
你将得到与我们类似的输出。
1 2 3 4 5 6 7 8 9 10
# ./password-update.sh
Newpassword: BAD PASSWORD: it is based on a dictionary word BAD PASSWORD: is too simple Retype newpassword: Changing passwordforuser renu. passwd: all authentication tokens updated successfully. Newpassword: BAD PASSWORD: it is based on a dictionary word BAD PASSWORD: is too simple Retype newpassword: Changing passwordforuser renu. passwd: all authentication tokens updated successfully.
[1] 07:58:07 [SUCCESS] CentOS.2daygeek.com Changing password for user root. passwd: all authentication tokens updated successfully. Stderr:New password: BAD PASSWORD: it is based on a dictionary word BAD PASSWORD: is too simple Retype new password: [2] 07:58:07 [SUCCESS] ArchLinux.2daygeek.com Changing password for user root. passwd: all authentication tokens updated successfully. Stderr:New password: BAD PASSWORD: it is based on a dictionary word BAD PASSWORD: is too simple