Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Aug 2001 23:00:05 -0700
From:      dannyman <dannyman@toldme.com>
To:        "Kulraj Gurm (bosa.ca Account)" <kulraj@bosa.ca>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Adding users - looking for shortcuts
Message-ID:  <20010815230005.F91674@toldme.com>
In-Reply-To: <001501c1260d$334e89e0$0ac8a8c0@kimsamy.com>; from kulraj@bosa.ca on Wed, Aug 15, 2001 at 09:37:47PM -0700
References:  <200108141447.KAA29143@cisco.com> <001501c1260d$334e89e0$0ac8a8c0@kimsamy.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 15, 2001 at 09:37:47PM -0700, Kulraj Gurm (bosa.ca Account) wrote:
[...]
> they are all going to have the same initial password.
> Then all I have to do is map username to aliases in virtual table and we
> have a functional e-mail accounts!
> 
> Is this going to work or am I asking for headaches? There must be an easier
> way than going through the adduser process 55 times.

Do this in vipw, or edit /etc/master.passwd directly, and then invoke
"pwd_mkdb /etc/master.passwd"

If you want to be fancy, script something up with pw(8).  Something
like:

for n [ 1 2 3 4 5 ]; do
	echo "foofoo" | pw useradd user${n} -h 0
done

This way, pw does all the worrying about creating unique UIDs, and
making home directories, and the like.

-danny

-- 
http://dannyman.toldme.com/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010815230005.F91674>