Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!clark!ade From: mike@clark.uucp (Mike Johnson) Newsgroups: comp.unix.questions Subject: set new passwd within a program? Message-ID: <1990Mar27.052240.3209@clark.uucp> Date: 27 Mar 90 05:22:40 GMT Reply-To: mike@clark.UUCP (Mike Johnson) Distribution: usa Organization: Clark College, Vancouver, Wa. USA. Lines: 20 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