Re: [Fedora] Re: User creation script

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

 



Joachim Backes wrote:
I think the problem is the password.
Splitting the script in to parts:

1. useradd   .... $1 .......
2. password --stdin <<"EOF"
$2
EOF

so if you call

script <USERNAME> "<PASSWORD>"

the password should be set correctly.

Actually, one can use the useradd command to create the user and set the password at the same time - you just have to remember to crypt() the password string before passing it to useradd.

--
H | It's not a bug - it's an undocumented feature.
 +--------------------------------------------------------------------
 Ashley M. Kirchner <mailto:ashley@xxxxxxxxxx>   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith             .     800.441.3873 x130
 Photo Craft Imaging                       .     3550 Arapahoe Ave. #6
http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux