set new passwd within a program?
Mike Johnson
mike at clark.uucp
Tue Mar 27 15:22:40 AEST 1990
I am sure this an easy question, but I can't seem to find the answer in
the manual. I am trying to write a script to automatically create a bunch
of logins. I can do everything except set new passwords. If I call passwd(1)
it insists on getting the new passwd from the terminal. I suspect that I
need to call /usr/lib/makekey, and shove the output into the /etc/shadow
file. But I can't seem to figure out how to feed the password into
makekey so that it produces the same output that passwd would. If
I do something like
echo "frog ll" | /usr/lib/makekey
where frog is the password and ll is supposed to be the salt, and then
put the output into the /etc/shadow file, it doesn't work.
Can somebody help me? Please send mail directly to me. I am using ESIX
System V release 3.2. Working shell scripts to do this sort of thing
would be most appreciated.
Mike Johnson
uunet!clark!mike
More information about the Comp.unix.questions
mailing list