Socket Programming Send password prompt from server to client for sudo cmd
807601Dec 18 2007 — edited Dec 20 2007Hi,
Will the socket be able to send the password prompt from server to client.
I am doing a Client Server connection tool where in user enters the unix commands in the Client window, the commands get transferred to Server where it is executed. Normal unix commands are working fine. But whenever i give commands like sudo, passwd,login the password prompt appears in the Server side instead of client side.
What i did was i created a shell using runtime.getruntime.exec("sh");and then i passed the commands as outcommand.write(command);
If i give ls in the Client which sits in some unix box i will get list of all the files(users home dir) in the Server box. Nothing comes up in the Server program which is running in the Server side.
But i when wanted to execute sudo ps -ef, it requires password and this password appears in the Server side. I need to get this password prompt appearing in the Client side. Thanks