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

Re: [Sheflug] useradd



technical wrote:
> 
> sorry but that went totaly over my head all i have is a large text file of
> the form
> 
> name passwd
> ..
> ..
> ..
> iv already setup the accounts but in shadow were the paassword goes theres a
> ! will what you described add a password to each user
> 
> Cheers Kevin Barrass
> IT Technician
> Minsthorpe Community College

Ah.

If the passwords are all the same, and encrypted, you can use the perl
one-liner on the shadow file. But please be carefull.

If they're all the same and not encrypted, set one manually, and use
the crypted string it comes up with.

If they're all different, and encrypted, you can use the perl 'map'
function
to produce a one-liner. I'm too tired to come up with one from the top
of my head now, but if no-one comes up with a solution on this list I
can look
into it next week.

Same goes for different - non-encrypted, only the perl one-liner will
change
into a perl two-or-three liner.

That should cover all possibilities, surely :-)

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.