Originally Posted by dsplayer14
Here with simple method we can use.
Noet: To reset password in one commad line,the below command will help you
echo new_passwd|passwd root –stdin
(2) Create passwordless RSA key authentication with your all server to Centralised server from where you will execute the script.
For Ref. you can see my blog
(3) after doing RSA authentication with Central Server.Create a bash script and add all ur 23 server name there.
ssh root@server_name1 "echo new_passwd|passwd root –stdin"
ssh root@server_name2 "echo new_passwd|passwd root –stdin"
ssh root@server_name3 "echo new_passwd|passwd root –stdin"
#chmod +x reset_root.sh
There are other ways also.this one is very simple . If you need some more advanced format,i need some time to create it for you,
(till then you can read expect command
also,do google for it)