![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| script to change root password | kvadivel80 | Shell Programming and Scripting | 3 | 09-18-2007 02:14 AM |
| script/program to change the password ? | kad | Shell Programming and Scripting | 0 | 06-01-2006 07:02 AM |
| Script to change UNIX password | kornshellmaven | Shell Programming and Scripting | 12 | 05-17-2006 12:58 PM |
| Change the password in 30 days in sftp script. | rosh0623 | UNIX for Advanced & Expert Users | 3 | 08-24-2005 11:39 AM |
| Script to automatically change password. | rahulrathod | Shell Programming and Scripting | 1 | 10-04-2004 08:33 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi All,
I have a problem. I need to write a shell script to change the password. The user may want to change his own password by this script. He will have to provide the required 3 parameters i.e. old password, new password and retype new password as arguments in command line. like, ./pass.sh old new new How do I do it. I am in a fix. ![]() I am not allowed to use expect etc. Please help me. Thanks. Asimananda |
|
||||
|
No, it will be a generic script, root user may provide username, password and retype password as arguments to it, it will be an added thing to the script.
It may be useful in changing passwords for many users at a time. I just wanted to know how do I automatically pass the values to interactive commands like passwd. Thanks. Asim |
|
||||
|
I dont have any clue for how to do this either..but may be this is the way forward... may be someone else from the group can help u sorting out this messy script to tell how to do this :-)
#! /bin/ksh DELAY=1 OLD="oldpasswd" NEW="nepasswd" passwd |& sleep $DELAY print -p $OLD sleep $DELAY print -p $NEW sleep $DELAY print -p $NEW |
|
||||
|
I also tried the script but it is not working. If someone have any answeres to it please post me
![]() Prashant. |
| Sponsored Links | ||
|
|