How would I telnet & change user password automatically in a script

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How would I telnet & change user password automatically in a script
# 1  
Old 01-11-2002
Question How would I telnet & change user password automatically in a script

I would like to create a script that logs into a list of several servers 50+ and changes my password all at once.

Every 60 days we are required to login to each system and change our passwords or else they expire and our login account is deleted.

I have an idea on how I could do this but have not tested whether you can run just a basic telnet in a script to automatically change to a predetermined password.

This has to work on AIX, Solaris, HP-UX, & Linux.

All of the existing passwords are the same for my account so no logic would have to be built for exceptions.

What would be the best way to do this?
# 2  
Old 01-11-2002

If you are authorized to use remote shell (rsh, remsh in AIX) this would be one way of accomplishing this. These commands allow you to runa command on a remote system if you have access to do so.

# 3  
Old 01-11-2002
Can't always do rsh commands

Unfortunately most of the servers I am trying to access do not allow rsh or any "r" commands.

I have tried to test autologging into the host but I don't know how to get telnet to accept a username and password from the script.
# 4  
Old 01-11-2002
You would not want to do this with telnet.... telnet has a text in the clear (not encrypted)... so you would be opening all these servers up to the potential for security breaches.......

You could use a script AFTER opening an SSH command line session... that means you need SSH on every server.....
# 5  
Old 01-14-2002

I will leave ssh up to the Systems Administrators, to see if they can provide some type of solution to synchronize our passwords. Some Admins but not all, use NIS+ which works well.

I don't care if I pass a clear text password. How would I create the script anyway?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to automatically enter password in a script?

Hi I'm working with AIX 6.1 I would like to ssh to a server without entering password ( to monitor something) but there's no way to do that by authentication keys, so I need to write a script which can ssh to that server without entering password ( no need to hide passsword in the script, just an... (9 Replies)
Discussion started by: bobochacha29
9 Replies

2. Homework & Coursework Questions

Need to write a script that parses name & password

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a script called that parses the name and password of given in a file (user.txt) and creates the user... (1 Reply)
Discussion started by: Nygenesis
1 Replies

3. Solaris

How to change the date automatically on script?

Hello Experts, There is a log file which has date stamp, I just wanted to change the date automatically on daily basis when it runs. Tried the below, but no luck. grep -i error /var/bv1to1_var/logs/`date +\%Y\%m\%d` | tee error_bv03.doc I would highly... (10 Replies)
Discussion started by: seenuvasan1985
10 Replies

4. Linux

script for password change for exiting user

Dear Forum, In our organization 100 user is existing. Now i want to change password for 100 user in linux server. Pls help to write script for changing password. Regads// Taifur (3 Replies)
Discussion started by: taifurakhand
3 Replies

5. UNIX for Dummies Questions & Answers

Automatically login in the telnet from present telnet

Hi, I was writing one script which includes to switch to the another telnet automatically from the present telnet server. I was using rlogin but firstly it takes the same user name of the present telnet and secondly it is prompting for the password. But i want to switch to the another telnet... (2 Replies)
Discussion started by: Prateek
2 Replies

6. Shell Programming and Scripting

Script to automatically enter a password

I need to retrieve thousands of lines of information from hundreds of nodes. Each node requires a passowrd in order to retrieve the information. Fortunately, the password is the same for each one of them. So I am trying to come up with a script that would allow me to include the password so I can... (0 Replies)
Discussion started by: Ernst
0 Replies

7. Shell Programming and Scripting

Shell Script to change a user password using script

Hi Experts, I had tried to executes this script to change the user password through script: No lines in buffer #!/bin/ksh cat /etc/passwd | grep -v userid >> /tmp/pass.tmp1 cat /etc/passwd | grep userid >> /tmp/pass.tmp2 PASS1=`cat /tmp/pass.tmp2 | cut -d ":" -f2` PASS2=`q2w3e4r5` sed... (3 Replies)
Discussion started by: indrajit_renu
3 Replies

8. Shell Programming and Scripting

Change root password automatically

I need to change root password automatically in some servers all three months. I want to run this process in one of the servers and reply it to the others. The password must be known by the administrator. (3 Replies)
Discussion started by: Alrica
3 Replies

9. UNIX for Dummies Questions & Answers

Can't change password for a user

All, I am unable to change a password for the user called : poller I am logged in as root When I do the following command passwd poller New Password: Permission denied Whe i enter the new password, it gives the above error. When i log in as poller and then execute the command, then... (2 Replies)
Discussion started by: rahulrathod
2 Replies

10. Shell Programming and Scripting

Script to automatically change password.

I want to write a script which will automatically take password sequentially from a file after every 10 days. i.e the passwd command should be executed automatically every 10 days and it should take the input from the password file sequentially. Has any1 got a solution?????????????? (1 Reply)
Discussion started by: rahulrathod
1 Replies
Login or Register to Ask a Question