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

Re: [Sheflug] useradd



technical wrote:

> But how can i bulk set the passwd as we are providing them with a pre set
> passwd the same as the rest of the network.
> Help
> 
> Cheers Kevin Barrass
> IT Technician Minsthorpe Community College.

perl -ne 's/^(.+?):(.+?):(.*)$/$1:cryptstring:$3/g && print' /etc/passwd

(don't actually feed it /etc/passwd, feed it only the entries of your
normal users)

Make sure you \escape any metacharacters you might have in your
encrypted
passwd string.

Jules
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word 
 "unsubscribe" in the body of the message. 

  GNU the choice of a complete generation.