1. Æнº¿öµå º¯°æ ½ºÅ©ÆÁÆ® ¹èÆ÷
#!/bin/bash
clear
for HOST in `cat /root/test/host`
do
echo "$HOST"
scp -p /root/test/ch_passwd.sh $HOST:/root/ch_passwd.sh
sleep 1
ssh $HOST "sh /root/ch_passwd.sh"
sleep 1
done
2. ¹èÆ÷µÈ ½ºÅ©¸³Æ® ½ÇÇà
#!/bin/bash
clear
echo -e "º¯°æÆнº¿öµå" | (passwd --stdin root) |
rm -rf /root/ch_passwd.sh