I am trying to create a script with the help of while and expect loop to do the following:
1. script will pick up the servers one by one from server_list file and will do ssh to it.
2. for each server it will change the password of user test1.
3. script should also provide logs for each and every step
below is sample script which i have created (doesnot inlcude the password change part , since i want to first make sure script run correctly before inclusding password change commmand in to it).
can someone help in modifying this script to fulfill all the mentioned requirement.
I'm not sure that you log snippet fits your code snippet as there's no LOG assignment in the code (or part of the code is overtyped due to e.g. <CR> chars at EOL). So I can't tell if there's e.g. an opening quote too many. Any how, in line 7, the ssh command lost one "s".
Hi,
I want to change the password of unix users on a number of servers.My plan was to ssh to all the servers in a shell script and use the passwd command. I tried to do so but everytime i run it i get this error.
ssh -x -n -l user1 host passwd
Changing password for "user1"
3004-709 Error... (3 Replies)
In my environment "SunOS - 5.10 Generic_142900-14 sun4v sparc SUNW,T5240" when I issue an ssh i get prompted for a password. I need to run an ssh in a script but is it possible to ready an encrypted password file or to pass the password in the script or configure it so that a particular user-id... (1 Reply)
Hi,
Is there an shell script/batch file to genarate random passwords which expires after a stipulated time period? Please suggest a software which does this for AIX and windows both else.
Thanks. (5 Replies)
Hi,
Is there a shell script or any software to genarate random passwords and the passwords expire automatically after a stipulated time period.
Please suggest. (2 Replies)
Hi all I am using tru64 Unix and I want to use batch file which makes me to change all user passwords at the same time ,instead of changing everyone separately. Please could anyone help me to do that. bye. (2 Replies)
Hi All ,
I need to call a script runscript_B.sh on server A, the runscript_B.sh script locating in server B.
The runscript_B.sh in calls another script runscript_A on server A itself.
it seend, i need to be connect from Server A to Server B using ssh.
I have tryed like this in... (3 Replies)
I am trying to write a script to change passwords for the same user on multiple servers.
My environment runs purely ssh / scp not rsh / rcp and therefore coping using rcp is not an option.
I have been playing with expect to perform tasks but think there must be a better way.
Has anyone got... (7 Replies)
I have SunOs 5.8. I need to change password using a unix shell script. I have tried to pipe the passwords to the passwd command but does not work. Pls provide a script to change passwds of a list of users using a shell script.
( I have also tried crypt() but did not work)
The flow of the... (2 Replies)
Hi,
if I am dialling in remotely it takes a long time to launch dxaccounts on Tru64 or SAM on our HP boxes.
Can anyone tell me how to reset users NIS passwords without knowing their old password from the command line?
When I use yppasswd it prompts me for the old password even though I am... (1 Reply)