On Sat, 4 Apr 1998 16:34:38 -0800 (PST), <[EMAIL PROTECTED]> wrote:
> I am tring to write a perl script that will add a user and set up their
> password. I have no problem adding the user, using a system call to the
> useradd command. I am tring to set the password like this:
>
> open(PASSWD, "| passwd " . $username);
> print PASSWD $password . "\n";
> print PASSWD $password . "\n";
> close(PASSWD);
>
> and is not working. it gives me a conversation error. Has anyone
> had success doing this? or know what else I need to put in there? I have
> done the same type thing with other commands, like htpasswd, and they
> worked fine.
Why would you use perl to run useradd and passwd? It is much faster to have
perl edit the files by hand.
--
Bryan C. Andregg * <[EMAIL PROTECTED]> * Red Hat Software
"Hey, wait a minute, you clowns are on dope!"
-- Owen Cheese in 'Shakes the Clown'
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.