Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How would I telnet & change user password automatically in a script Post 13112 by darthur on Friday 11th of January 2002 10:15:26 AM
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?
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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/bv03.bectondickinson.com/bvlog.out.`date +\%Y\%m\%d` | tee error_bv03.doc I would highly... (10 Replies)
Discussion started by: seenuvasan1985
10 Replies

9. Homework & Coursework Questions

Need to write a script user.sh 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 user.sh 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

10. 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
SHADOW(5)						   File Formats and Conversions 						 SHADOW(5)

NAME
shadow - shadowed password file DESCRIPTION
shadow is a file which contains the password information for the system's accounts and optional aging information. This file must not be readable by regular users if password security is to be maintained. Each line of this file contains 9 fields, separated by colons (":"), in the following order: login name It must be a valid account name, which exist on the system. encrypted password Refer to crypt(3) for details on how this string is interpreted. If the password field contains some string that is not a valid result of crypt(3), for instance ! or *, the user will not be able to use a unix password to log in (but the user may log in the system by other means). This field may be empty, in which case no passwords are required to authenticate as the specified login name. However, some applications which read the /etc/shadow file may decide not to permit any access at all if the password field is empty. A password field which starts with an exclamation mark means that the password is locked. The remaining characters on the line represent the password field before the password was locked. date of last password change The date of the last password change, expressed as the number of days since Jan 1, 1970. The value 0 has a special meaning, which is that the user should change her password the next time she will log in the system. An empty field means that password aging features are disabled. minimum password age The minimum password age is the number of days the user will have to wait before she will be allowed to change her password again. An empty field and value 0 mean that there are no minimum password age. maximum password age The maximum password age is the number of days after which the user will have to change her password. After this number of days is elapsed, the password may still be valid. The user should be asked to change her password the next time she will log in. An empty field means that there are no maximum password age, no password warning period, and no password inactivity period (see below). If the maximum password age is lower than the minimum password age, the user cannot change her password. password warning period The number of days before a password is going to expire (see the maximum password age above) during which the user should be warned. An empty field and value 0 mean that there are no password warning period. password inactivity period The number of days after a password has expired (see the maximum password age above) during which the password should still be accepted (and the user should update her password during the next login). After expiration of the password and this expiration period is elapsed, no login is possible using the current user's password. The user should contact her administrator. An empty field means that there are no enforcement of an inactivity period. account expiration date The date of expiration of the account, expressed as the number of days since Jan 1, 1970. Note that an account expiration differs from a password expiration. In case of an account expiration, the user shall not be allowed to login. In case of a password expiration, the user is not allowed to login using her password. An empty field means that the account will never expire. The value 0 should not be used as it is interpreted as either an account with no expiration, or as an expiration on Jan 1, 1970. reserved field This field is reserved for future use. FILES
/etc/passwd User account information. /etc/shadow Secure user account information. /etc/shadow- Backup file for /etc/shadow. Note that this file is used by the tools of the shadow toolsuite, but not by all user and password management tools. SEE ALSO
chage(1), login(1), passwd(1), passwd(5), pwck(8), pwconv(8), pwunconv(8), su(1), sulogin(8). shadow-utils 4.5 01/25/2018 SHADOW(5)
All times are GMT -4. The time now is 06:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy