If you read the manual closer, you'll see that -p requires the encrypted
password.  You need to call crypt with your password, and pass the output
to useradd.  At least thats the way it works on RedHat.

Unfortunatly, AFAIK, there is no shell script access to crypt. I created a
perl script to frontend useradd.

Shawn said:
> On Mon, 18 Aug 2003 10:49:00 -0500
> Shawn <sfertch at real-time.com> wrote:
>
>> Adduser is the interactive creation process, on Slackware at least.
>> Oh, and Tru64.  What you want to look at is useradd.  Do a man against
>> useradd and look at the options.  I did see an option there on -p for
>> password, but didn't look into it.  Might be easier than going thru
>> webmin.
>>
>
> Here's the syntax you want to follow.  It worked for me on Slack, but
> the password option didn't work:
>
> root at server:/# useradd -c 'User Name' -d /home/guest9 -g users -m -k
> /etc/skel -p password -s /bin/bash -u 33499 guest9
>
> Hope that helps to get you going in the right direction.  Again, the
> password option  didn't work for me, so you'll need to research that.
>
>
> --
> Shawn
>
>   The difficult we do today; the impossible take a little longer.
>
>   Ne Obliviscaris --  "Forget Not"
>
> _______________________________________________
> TCLUG 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




_______________________________________________
TCLUG 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