I want to script the use of passwd. Since it accesses the controlling tty directly, I cannot do this with standard IO redirection.
I may not install additional perl modules nor the expect utility.
I have written a perl script to do this but there is something missing. I think I need to do something to make the new tty the controlling terminal for the forked process but cannot find out what it is I need to do.
I posted my attempt as an attachement here
because one of the posters seemed to have done something similar.
This will ultimately be used to change the passwords on all servers in a network. Right now, to test, it should display what passwd writes to the tty and reply with what is input on the keyboard. The while loop is strictly utilitarian, designed for a testing.