It is currently Sat, 24 Oct 2020 08:39:36 GMT



 
Author Message
 Changing password via script
I need to change passwords at 200+ sites but redirecting a password into passwd
isn't accepted.

How does one go about changing a password via a script that doesn't require
user interaction?

Is there source out there for doing it?

Please email.. thanks in advance.

bob.daniel
bdan...@cashways.com



 Fri, 05 Jun 1998 03:00:00 GMT   
 Changing password via script

    bd> How does one go about changing a password via a script that
    bd> doesn't require user interaction?

If the processes are running as root, try the following:

  Verify old password
  Get new password
  Encrypt it
  Foreach machine {
    Lock the password file
    Insert encrypted password
    Unlock the password file
  }

Good luck,
--
http://seven.ucs.indiana.edu/~mliggett |||        Matt Liggett       |
$_="5673089a34120b12c048de12f\n"; ///  |||   <mligg...@indiana.edu>  |
@j=split//," erthJusanoPlck.";   ///   |||   '70 Midget '74 Bronco   |
s/./$j[hex $&]/ge;print         ///    |||       '78 Civic 1200      |



 Sat, 06 Jun 1998 03:00:00 GMT   
 Changing password via script
|> I need to change passwords at 200+ sites but redirecting a password into passwd
|> isn't accepted.
|>
|> How does one go about changing a password via a script that doesn't require
|> user interaction?
|>
|> Is there source out there for doing it?
|>
|> Please email.. thanks in advance.
|>

Get the TCL based _Expect_ package

        ftp://ftp.cme.nist.gov/pub/expect
--
/*----------------------------------------------------------*/
/*  Mike D. Kail                 |  voice:  (619) 793-3359  */
/*  System Administrator         |  fax:    (619) 793-2950  */
/*  FIRST VIRTUAL Holdings Inc.  |  e-mail: mdk...@fv.com   */
/*----------------------------------------------------------*/



 Sat, 06 Jun 1998 03:00:00 GMT   
 Changing password via script
In article <4b6olt$...@atlas.tncnet.com>, mdk...@fv.com (Mike D. Kail) writes:
|> In article <4b4j8v$...@news.cis.nctu.edu.tw>, r...@tyrell.net (bd) writes:
|> |> I need to change passwords at 200+ sites but redirecting a password into passwd
|> |> isn't accepted.
|> |>
|> |> How does one go about changing a password via a script that doesn't require
|> |> user interaction?
|> |>
|> |> Is there source out there for doing it?
|> |>
|> |> Please email.. thanks in advance.
|> |>
|>
|> Get the TCL based _Expect_ package
|>
|>   ftp://ftp.cme.nist.gov/pub/expect

I used to use makekey(1?) which reads a 10 character string (exactly)
(8 password plus 2 seed characters) and outputs the 13 character
string (no newline).  This program seems to be only available on
the Solaris Encryption Kit (US only).

ie: (from memory!)

PASSWD=$(print "passwordXX" | makekey)
print "auser:${PASSWD}:9462::::::" >> /etc/shadow

rh



 Mon, 08 Jun 1998 03:00:00 GMT   
 Changing password via script
In article <4bagl4$...@shore.shore.net>,

What to do if the password is less than 8 characters?  I assume the passwd
command pads it with something, but the manpages don't explain.

Steve Kives



 Wed, 17 Jun 1998 03:00:00 GMT   
 Changing password via script
|> In article <4bagl4$...@shore.shore.net>,
|> Russell Hammer <r...@perneus.shore.net> wrote:
|> >
|> >I used to use makekey(1?) which reads a 10 character string (exactly)
|> >(8 password plus 2 seed characters) and outputs the 13 character
|> >string (no newline).  This program seems to be only available on
|> >the Solaris Encryption Kit (US only).
|> >
|>
|> What to do if the password is less than 8 characters?  I assume the passwd
|> command pads it with something, but the manpages don't explain.

you have to pad it yourself

(from ksh)

# export EPASSWD=$(print -n "foobar\0\0AA" | /usr/lib/makekey)
# print adm:${EPASSWD}:6445::::::
AAZk9Aj5/Ue0E

rh



 Fri, 19 Jun 1998 03:00:00 GMT   
 
   [ 6 post ] 

Similar Threads

1. CGI script for changing passwords via WWW

2. changing password via shell script

3. Changing passwords from a sh scripts (or csh script)

4. Passwords changing via windoze clients

5. changing user passwords via poppassd

6. changing passwords via a gui

7. User change password via Web?

8. Changing other users password via npasswd

9. Forced password change via ssh doesn't work


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