From: rdorich@Emerald.tufts.edu (Roberto Dorich)
Subject: Re: passwd redirection
Date: Fri, 15 Jul 1994 15:10:33 GMT [thread overview]
Message-ID: <RDORICH.94Jul15111033@Emerald.tufts.edu> (raw)
In-Reply-To: nance@niehs.nih.gov's message of 13 Jul 1994 18:45:09 GMT
>>>>> "Bob" == Bob Nance <nance@niehs.nih.gov> 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
----------------------------------------------------------------------------
next prev parent reply other threads:[~1994-07-15 15:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-07-13 18:45 passwd redirection Bob Nance
1994-07-15 15:10 ` Roberto Dorich [this message]
1994-07-17 12:23 ` A. Andrew Brennan
1994-07-16 18:18 ` Gary Newman
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox