Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sun-barr!olivea!mintaka!bloom-beacon!eru!hagbard!sunic!sics.se!uplog.se!uplog.uppsala.telesoft.se!thomas From: thomas@uppsala.telesoft.se (Thomas Tornblom) Newsgroups: comp.unix.questions Subject: Re: help with execve Message-ID: Date: 23 Oct 90 09:52:07 GMT References: <6732@hub.ucsb.edu> Sender: thomas@uplog.se (Thomas Tornblom) Distribution: comp.unix.questions Organization: Telesoft Uppsala AB Lines: 26 In-Reply-To: basilisk@banana.ucsb.edu's message of 23 Oct 90 05:50:51 GMT In article <6732@hub.ucsb.edu> basilisk@banana.ucsb.edu (Can't touch this...) writes: I am trying to run a process within a program by using 'execve'. More specifically, I want to execute the 'login' command so I can log on to another machine into my other account. I am having trouble getting it to accept my password, though. First of all, it doesn't seem to accept it from stdin, because I first tried to pipe it in. Also, it seems to prompt for the password over stderr. Is there any way to send input to this process? Am I just going to have to give up and do it manually?? Should I be using something other than execve??? Help would be greatly appreciated...thanks in advance...if I've said something really stupid, no flames, please (I've RTFMed and it hasn't helped)... I can't imagine what you're trying to do. Anyway, the password is read from the terminal with getpass(3), and if you had RTFMed a little better you would know that it reads the password from /dev/tty, not stdin. -- Real life: Thomas Tornblom Email: thomas@uppsala.telesoft.se Snail mail: Telesoft Uppsala AB Phone: +46 18 189406 Box 1218 Fax: +46 18 132039 S - 751 42 Uppsala, Sweden