rhlinux wrote:
elslam 3alikom,
i wanna run an interactive system command through my program for example i wanna add a user with its password that is given in the program not by the user, do any one here have any idea how can i do so in perl
i tried


quote: ------------------------------------------------------------------------------
system(passwd username ) ------------------------------------------------------------------------------


but this takes the password from the user, i have also tried a lot of attributes to passwd command but nothing worked

I've tried just about every method you can think of to get this to work correctly. Unfortunately, passwd is coded to only accept from a tty. The only thing I could think of to get it to work is to create a pseudo tty (pty) and use that to send input to the passwd program. I have no idea how to do this, though. There may also be an easier way.


--
Andrew Gaffney


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



Reply via email to