Subject: RE: script to add users
To: Carlo Smith <reed@reedmedia.net>
From: Sporleder, Matthew \(CCI-Atlanta\) <Matthew.Sporleder@cox.com>
List: netbsd-help
Date: 12/03/2002 05:09:58
#! /bin/sh
for x in `cat list.names` ;
do
useradd <options(like -m)> $x
done

But this doesn't do the checking bit.


-----Original Message-----
From: Carlo Smith [mailto:postfix2002@hotmail.com]
Sent: Tuesday, December 03, 2002 4:58 AM
To: reed@reedmedia.net
Cc: netbsd-help@netbsd.org
Subject: Re: script to add users


I know you can do all that from the commandline ... but I need to create =
150=20
id's and would like to do this a lill automated. Certainly as a few =
accounts=20
will already be active.


>From: "Jeremy C. Reed" <reed@reedmedia.net>
>To: Carlo Smith <postfix2002@hotmail.com>
>CC: netbsd-help@netbsd.org
>Subject: Re: script to add users
>Date: Tue, 3 Dec 2002 01:51:13 -0800 (PST)
>
>On Tue, 3 Dec 2002, Carlo Smith wrote:
>
> > looking for a script to add users including homedirs, it also needs =
to=20
>check
> > if the user already exist.
>
>NetBSD now includes tools for this.
>
>See the manual pages for user, useradd, userinfo, etc.
>
>For example to add a new user with a home directory, you can use =
"useradd
>-m username".
>
>And to check if a user exists, "userinfo username".
>
>Have fun!
>
>    Jeremy C. Reed
>    http://www.reedmedia.net/


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.=20
http://join.msn.com/?page=3Dfeatures/virus