How can I set passwords from script/file?

Hugo Calendar hugo at saturn.ucsc.edu
Tue May 14 23:18:47 AEST 1991


In article <1991May13.155155.258 at vax1.cc.lehigh.edu> lusgr at vax1.cc.lehigh.edu (Steve Roseman) writes:
>Does anyone have a good way of setting user passwords from a file, script,
>etc.?  Running "passwd username <file" gives a "Must run from tty" error
>message.  I need this capability for administrative mass password setting, and
>changing the user interface for passwd (not my idea.)

You could try writing some C code to alter the /etc/passwd file, or
use some C in conjunction with awk or something.  Use the "crypt()"
function to generate password encryptions, (see man crypt).  If you
don't get my drift, mail me, and I'll send you something workable.

Hugo



More information about the Comp.unix.aix mailing list