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

Re: Batch mode for adduser



On Fri, 2003-07-25 at 20:36, Ethan Bonick wrote:
> I would like to request a newusers like program that will take plain text
> passwords and encrypt them so the program could be useful. Newusers
> leavesthe password in plaintext which is not secure at all.

Hmm, here newusers crypt()s the password, but doesn't make an MD5 hash
out of it.

> I have created a script that does this same kind of function but it
> only works on RedHat because other distro's dont compile with the same
> options. Check it out on www.networkinggeeks.com/scripts.html If
> anyone knows how to rewrite newusers to crypt the password it would be
> a wonderful addition. In my Linux classes we went over the newusers
> command but deemd it useless because it wont crypt the passwords. Does
> anyone else feel this would be a very useful utility?

I usually use a shell script that takes a similar file like newusers
which eventually runs groupadd, then useradd and finally runs passwd 
like this to set the password:

[...]
(echo $newpasswd; echo $newpasswd) | passwd $newuser
[...]

This works here (also a Red Hat system) but should work anywhere where
useradd/groupadd exist/work.

Nils
-- 
     Nils Philippsen    /    Red Hat    /    nphilipp redhat com
"They that can give up essential liberty to obtain a little temporary
 safety deserve neither liberty nor safety."     -- B. Franklin, 1759
 PGP fingerprint:  C4A8 9474 5C4C ADE3 2B8F  656D 47D8 9B65 6951 3011

Attachment: signature.asc
Description: This is a digitally signed message part


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