From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,45e0ddf97f5f58c9 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-07-15 08:32:15 PST Newsgroups: comp.unix.osf.osf1 Path: bga.com!news.sprintlink.net!hookup!yeshua.marcam.com!MathWorks.Com!news2.near.net!noc.near.net!news.tufts.edu!rdorich From: rdorich@Emerald.tufts.edu (Roberto Dorich) Subject: Re: passwd redirection In-Reply-To: nance@niehs.nih.gov's message of 13 Jul 1994 18:45:09 GMT Message-ID: Sender: news@news.tufts.edu (USENET News System) Organization: Tufts University - Medford, MA References: <301cnl$1of@jeeves.niehs.nih.gov> Date: Fri, 15 Jul 1994 15:10:33 GMT >>>>> "Bob" == Bob Nance writes: Bob> Hi all! I have a need to run the passwd application and have it Bob> take input from stdin. This is how I'd like to do it... Bob> % passwd < secure_password_change_file Bob> where the file contains: Bob> oldpassword newpassword newpassword This is not very secure... We only want to do it to reset passwords, so only root will be able to do it (without entering an old password). Bob> Unfortunately, it appears that passwd does not read from stdin, Bob> so this does not work. Does anyone have any ideas on a way to do Bob> this? We are planning to use the expect program down here (expect-5.8 compiles just fine under osf). I also made a C program to do the same thing by actually rewriting the password files this worked fine with a dummy passwd file, but I am not sure if the putpwent(3) functions take care of all the ins and outs of passwd. Doesn't osf use dbm files for this? Rob -- Roberto Dorich o SKI rdorich@emerald.tufts.edu Electrical Engineering /= EXTREME rdorich@athena.mit.edu Tufts University __/__, uucp: roberto@kastle.ext.tufts.edu ----------------------------------------------------------------------------