If you use the adduser command, add the -p option.  This, unfortunatly, requires
that the parameter be encrypted before calling adduser, with the crypt() function.
I wrote a bash script to do exactly this.  It has to call perl to do some of the
dirty work.  Why don't they have a command line interface for crypt.

Download it from http://dccmn.com/mkuser

michael.arolan at excite.com wrote:
>
>
>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.
>
>
>
>_______________________________________________
>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