Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

root password maintenance sript

Status
Not open for further replies.

ponetguy2

MIS
Aug 28, 2002
442
US
Hello everyone. I'm back again needing help.

I was assigned to change the root password on 2,000 RH and Solaris servers. There is no way I can login to each one and change the root password manually. Unfortunately, my scripting skills really suck. I wrote a script three months ago, but it was terrible. Some machines were updated with the new password and some did not. It was a disaster. I'm hoping someone already has a script to perform this task.

Please help. Thank you in advance.

FYI: the only way to login to each box is via ssh.

"Not all OSs suck, it's just that some OSs suck worse than others"


 
Since they all run SSH, you can use plink.exe (See PuTTy) to automate running a single script against each one. Your real problem is responding to the interactive prompts to change the password. I recommend you look at Expect, which was designed for this sort of problem.

Google should help with finding an existing expect script to do this. PuTTy documentation will help with plink.exe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top