It is currently Sat, 05 Dec 2020 11:59:41 GMT



 
Author Message
 Automated password change from within shell script.

Hi,

I want to be able to change user-passwords from withing a shell-script.
I tried the standard passwd program but was unable to redirect the
interactive keyboard driven password change mechanism to read the new
passwords from a file.
Is there some "passwd" program or shell script around that enables you to
supply the new password on the command line ?
We run Solaris 2.4 on multiple SS5's.

Thanks,
Pieter Boeykens
Bayer Antwerpen.
e...@bayant.be



 Sat, 05 Feb 2000 03:00:00 GMT   
 Automated password change from within shell script.

look into using expect scripts...they will do exactly what you want.

-Fiji



 Sat, 05 Feb 2000 03:00:00 GMT   
 Automated password change from within shell script.

I have written a small Perl script which reads in the shadow file and
replaces the password field of the user (supplied on the command line)
with one that is randomly generated (encrypted of course). This random
password is then displayed to the invoker of the script and the password
is expired so that the user is forced to change it on the next login.
The only problem is that you need to open the shadow file with a lock to
prevent someone else modifying it at the same time. It's not elegant but
it works. I set it up for our Help desk staff to use. It can easily be
modified to accept a password at the command line!



 Mon, 07 Feb 2000 03:00:00 GMT   
 
   [ 3 post ] 

Similar Threads

1. Automated password change from within shell script.

2. Changing the password from within a script

3. shell script within shell script (general question)

4. Change standard output within a shell script

5. Changing directories within a bash shell script

6. Changing user within shell script

7. Change user password using shell script

8. Changing User Passwords in Shell Script


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software