useradd in "slackware linux" from Java Application
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Shariful_Ahsan
Posted On:   Saturday, September 8, 2001 09:07 AM

I want to add an user from java program. I did this in Red Hat linux. The code was... Runtime.getRuntime().exec("adduser "+uName); In Slackware the command is different. I tried to use useradd -s /bin/bash username It works but cannot provide password. I couls use useradd -p userpassword username But the password should be encrypted using crypt(3). But i could not encrypt the password. If I could I could have create the user with password. So, If anyone can help me about this, it will be a great help for me. ahsan    More>>

I want to add an user from java program. I did this in Red Hat linux. The code was...


Runtime.getRuntime().exec("adduser "+uName);




In Slackware the command is different. I tried to use useradd -s /bin/bash username


It works but cannot provide password. I couls use

useradd -p userpassword username



But the password should be encrypted using crypt(3). But i could not encrypt the password. If I could I could have create the user with password.

So, If anyone can help me about this, it will be a great help for me.

ahsan    <<Less

Re: useradd in "slackware linux" from Java Application

Posted By:   Thomas_Mathis  
Posted On:   Thursday, September 27, 2001 12:29 PM

You can add the user and then change his password.

Take a look at this
Link

thomas
About | Sitemap | Contact