Re: Adding users from a list or database?
Martin Bialasinski wrote:
>
> >> "SP" == Steve Phillips <sjp@siliconlogic.com> writes:
>
> SP> I would like to be able to add users from a list, to avoid the
> SP> interactive nature of adduser. Is there a tool that does
> SP> something like this? A couple of years ago I modified adduser to
>
> Well, I would write a small perlscript, that reads the flat DB and
> calls adduser. You can set everything but the password as options.
>
> Call it with --disabled-password, then set the password with the
> chpasswd program.
>
Exactly what I was going to do except I didn't know about the chpasswd
command. I was going to use perl to hack the /etc/shadow file directly,
but chpasswd will make this very easy to do! Thanks for pointing it
out!
When I did this a few years ago adduser didn't have alot of the features
it has now.
Steve
--
Steve Phillips Phone: (715) 830-1200 x109
Silicon Logic Engineering, LLP FAX: (715) 830-1887
131 South Barstow Street, Suite 600 Email: steve@siliconlogic.com
Eau Claire, WI 54701 WWW: www.siliconlogic.com
Reply to: