How about:

useradd ... username
echo my_spiffy_password | passwd --stdin username

--Greg

> ----------
> From: 	michael.arolan at excite.com[SMTP:michael.arolan at excite.com]
> Reply To: 	tclug-list at mn-linux.org
> Sent: 	Friday, February 28, 2003 3:16 PM
> To: 	tclug-list at mn-linux.org
> Subject: 	Re: [TCLUG] Default user password (Still not solved!)
> 
> 
> Thanks guys for your replies!
> 
> I am actually developing a program that would dynamically create a user on the Linux box and set the password to the password supplied by the new user.  Unfortunately, the solution you've all described requires manual intervention which is what we are trying to get around.  Do you know of any other way?  The program doing the automation is written in C and uses the system command to execute a add user command.  The actual request comes from the web!  So the architecture is:
> 
> Web browser -> Java servlet -> C program (via JNI) -> user created on the Linux Box!
> 
> As you can see, no manual intervention!  Do you know of anyother way to set the password dynammically?
> 
> Thanks Guys
> 
> Michael
> 
>  --- On Fri 02/28, Bob Tanner < tanner at real-time.com > wrote:
> From: Bob Tanner [mailto: tanner at real-time.com]
> To: tclug-list at mn-linux.org
> Date: Fri, 28 Feb 2003 13:01:27 -0600
> Subject: Re: [TCLUG] Default user password
> 
> On Friday 28 February 2003 12:33 pm,  wrote:
> > Hi Guys/Ladies
> >
> > Does anyone know what the default password Linux uses when you create a new
> > user from the command line?
> 
> No password. 
> 
> Use passwd <username> to change it.
> 
> 
> -- 
> Bob Tanner <tanner at real-time.com>         | Phone : (952)943-8700
> http://www.mn-linux.org, Minnesota, Linux | Fax   : (952)943-8500
> Key fingerprint = AB15 0BDF BCDE 4369 5B42  1973 7CF1 A709 2CC1 B288
> 
> _______________________________________________
> Twin Cities Linux Users Group Mailing List - Minneapolis/St. Paul, Minnesota
> http://www.mn-linux.org tclug-list at mn-linux.org
> https://mailman.real-time.com/mailman/listinfo/tclug-list
> 
> 
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
> 
> _______________________________________________
> Twin Cities Linux Users Group Mailing List - Minneapolis/St. Paul, Minnesota
> http://www.mn-linux.org tclug-list at mn-linux.org
> https://mailman.real-time.com/mailman/listinfo/tclug-list
> 

_______________________________________________
Twin Cities Linux Users Group Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list