dcsimg
changing the Linux password
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, July 18, 2001 05:50 AM

can i change the linux password thru my java program... if possible please let me know ..

i tried using Runtime and process objects but could'nt make it


hope i'll get some answer

thanks in advance

harsha g.v.s.

Re: changing the Linux password

Posted By:   shilpa_ratwani  
Posted On:   Monday, July 30, 2001 07:30 AM

Hi,
u can change the password thru java,
have u tried using the following block of code to do the same, it works for me.

Process process=Runtime.getRuntime().exec("passwd");
process.waitFor();
OutputStream proc=process.getOutputStream();
process.destroy();
System.out.println("The output string is "+proc.toString());
proc.close();
About | Sitemap | Contact