Change Unix System Password Using JAVA
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   mazhar_saeed
Posted On:   Monday, February 4, 2002 05:58 AM

Hay;
I am going to Change Unix User Password By simple Runtime.exec("passwd userName") command. it will ask for password twice. can any body help me how can i give that password to that process so that the password would be changed sucessfully;

Thanx

Re: Change Unix System Password Using JAVA

Posted By:   Jens_Dibbern  
Posted On:   Monday, February 4, 2002 06:25 AM

ReHay,

if you use the getXxxStream() methods from the Process object that Runtime.exec(...) returns, you should be able to write to the input stream the new password twice and read from the output stream to check if it has been successfully changed.

HTH
About | Sitemap | Contact