Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!uunet!mcsun!unido!logixwi!jpm From: jpm@logixwi.uucp (Jan-Piet Mens @ Logix GmbH, Wiesbaden) Newsgroups: comp.unix.wizards Subject: Re: Password Pipe Message-ID: <1991Mar28.093251.6547@logixwi.uucp> Date: 28 Mar 91 09:32:51 GMT Article-I.D.: logixwi.1991Mar28.093251.6547 References: <13766@helios.TAMU.EDU> Reply-To: jpm@logixwi.UUCP (Jan-Piet Mens) Organization: Logix GmbH, Wiesbaden, W-Germany Lines: 22 In article <13766@helios.TAMU.EDU> packman@tamuts.tamu.edu (Wally Strzelec) writes: >Howdy.... I am writing a short program that will allow me to change the >password on a remote machine. To do this I am trying to use popen and >feed it the "/etc/passwd" command on the remote machine. The problem ^^^^^^^^^^^ Don't you mean "/bin/passwd" ? >is that it seems that the passwd command doesn't accept anything that >I send down the pipe. Can someone please tell me where I am messing >up. The following is my test: The reason why this will never work, is because "/bin/passwd" (the program) opens /dev/tty to read the password directly from the terminal, and does not accept the password from stdin. Regards, JP -- Jan-Piet Mens, Logix GmbH jpm@logixwi.UUCP Moritzstr. 50, D-6200 Wiesbaden ...!uunet!mcsun!unido!logixwi!jpm