[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Kickstart User Creation



On Sun, 27 Apr 2003, Robert Denton wrote:

> I am trying to use the kickstart post installation script to create a user
> _with_ a password.  I have tried:
> 
> useradd -G root -p menace phantom
> 
> To create a user by the name of phantom with a the password menace.  This
> didn't work and after a review of the man page associated with useradd, it
> would seem that if you are going to include the password in this command you
> need to supply it in an encrypted form (with crypt(3)) and I am not quite
> certain how to do that.  I also considered going the other route:
> 
> useradd -G root phantom
> passwd phantom
> 
> But that requires further interaction and this doesn't seem to be possible
> in a kickstart post installation script.  Has anyone tried this at all? I
> would appreciate any advice regarding the best way to do this.
> 

Create the user account and then run usermod:
/usr/sbin/usermod -p '<encrypterd_password>' <userid>

To get the encrypted password, create a user account temporarily on 
another machine, assign it the password, and get the encrypted password 
from /etc/shadow.

Werner






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]