i want a shell script to change the root password for 26 redhat system in on go
i want a shell script to change the password for 26 redhat system in on go
|
At your own risk:
http://www.novell.com/coolsolutions/tools/17386.html I just googled "script to change root password". Good luck. |
If i am wrong .... ( but i do not think so)
as per the LQ RULES !!! we will NOT help you "crack" and illegally hack systems there are IRC's for that basically if you HAVE to ask HOW then you should NOT be even tiring this |
Quote:
|
Quote:
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 http://sharadchhetri.com/2011/11/28/...ordless-login/ (3) after doing RSA authentication with Central Server.Create a bash script and add all ur 23 server name there. vi reset_root.sh #!/bin/bash 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" :wq #chmod +x reset_root.sh # ./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) |
thanks sackboy i'll try it
thanks sackboy i'll try it
|
Quote:
i'll not crack anything, coz i have all the privileges to do any thing in the system but i need to change the root password every while and i do it manually but this is so tedious |
Quote:
i'll try it, it seems perfect but please can you make the expect script coz i found alot of expect scripting on the web but all are confusing thank u very much |
Quote:
u can try with this http://sharadchhetri.com/2010/12/07/how-to-use-expect-in-bash-script/ Try sshpass package also. Read once,it will be useful. http://sharadchhetri.com/2011/12/02/...er-by-sshpass/ |
Quote:
thank u sharadchhetri |
All times are GMT -5. The time now is 03:39 AM. |