Password Pipe

Jan-Piet Mens @ Logix GmbH, Wiesbaden jpm at logixwi.uucp
Thu Mar 28 19:32:51 AEST 1991


In article <13766 at helios.TAMU.EDU> packman at 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 at logixwi.UUCP
Moritzstr. 50, D-6200 Wiesbaden            ...!uunet!mcsun!unido!logixwi!jpm



More information about the Comp.unix.wizards mailing list