basilisk@banana.ucsb.edu (Can't touch this...) (10/23/90)
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)... -- =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= | Basilisk, who is he? Basilisk, what is he? | Ed Jordan | | Basilisk,Ba-basilisk, where does he come from?| basilisk@cornu.ucsb.edu | =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
thomas@uppsala.telesoft.se (Thomas Tornblom) (10/23/90)
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
basilisk@banana.ucsb.edu (Can't touch this...) (10/24/90)
>I can't imagine what you're trying to do. A class project. Do you really think that if I were trying to do something dishonorable I would ask the whole world for help? >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. Thanks for the help. I could have done without the snide remark, though. If giving advice is such a chore, why do it? -- =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= | Basilisk, who is he? Basilisk, what is he? | Ed Jordan | | Basilisk,Ba-basilisk, where does he come from?| basilisk@cornu.ucsb.edu | =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=