Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 11-30-2005, 12:03 AM   #11 (permalink)
 
Master Techie

Join Date: Apr 2004

Posts: 2,534

horndude is on a distinguished road

Default

download the shadow 4.03 package, it has all the login and passwd tools, modify the passwd.c file and the other files it uses as needed and recompile them, then use that

this isnt easy, my C programming skills suck, wish I could help more

you should be able to use an unshadowed passwd for the users but that is a security risk, see the passwd or shadow how-to at http://www.tldp.org
horndude is offline  
Old 11-30-2005, 10:20 AM   #12 (permalink)
 
Master Techie

Join Date: Apr 2004

Posts: 2,534

horndude is on a distinguished road

Default

if you want to just set up a user/password system bypassing the linux shadow password system you can do that too, but it would probably be better to use php or MySQL or soemthing if its gonna be a website, and its still a security issue
horndude is offline  
Old 12-03-2005, 05:02 AM   #13 (permalink)
 
Newb Techie

Join Date: Nov 2005

Posts: 7

mebrahim

Default Re: Useradd script

Quote:
Originally posted by spyro187
Does anyone know of a good script that can add a single user and password. I need to pass it a username and password and have it add them automatically .

just use :
useradd -m -p password username
(-m is to create home directory which can be ommited)
Quote:
The problem I am having with scripting it is that I can't figure out how to pass the password when promted.
You can always redirect stdio:
passwd < file_containing_your_password_in_1st_and_2nd_line_ and_nothing_more
But .. not beautiful!
mebrahim is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On