To preface this, let me say that I am a system administrator responsible for
creating and modifying User accounts on a Unix system. 

Is it possible to make a Perl script to change passwords using the passwd
command without having to get and answer those prompts??? I have tried
opening a process filehandle (as documented on Pg 201-202 in "Learning Perl
3rd edition') like so:

my $user="dingbat";
open PWD,"|passwd $user";
 
also 

open PWD,"passwd $user|";

also 

open PWD,"|passwd $user|";

and then do a 

Print PWD "password";
Print PWD "password";

which is supposed to answer the prompts.

None of them seems to work. Am I doing something wrong? I think you can do
something like this in expect, but we are not allowed to install that. 

Will Perl do the above or not? Any help would be appreciated.

.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to