0

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
http://www.daniweb.com/techtalkforums/post251181-11.html
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.

2
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by sut
0

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 personally have no idea how to do that. If you get no answers here you may want to post on www.perlmonks.com

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.