Subject: Re: adduser script
To: None <>
From: Simon J. Gerraty <>
List: current-users
Date: 09/30/1998 14:09:18
>Looking for a automated adduser script for NetBSD.
>The one built-in to FreeBSD doesn't seem to work correctly in  
>NetBSD.  The main objective is to add users via script.

>This MUST be a faq

It is and I think it is covered in the FAQ.

Anyway there is addnerd in the pkgs stuff, though I've always
[which I just noticed was out of date - so I've updated it:-)]
It can be used interactively, but I normally just run (esp in scripts) user:x:uid:gid:full name:/home/dir:shell

there are options to tell it whether to force use of uid/id or to
take them as hints.  Handy if you want to add a bunch of users with

Yes that's a v7 style passwd entry btw, knows how to take that
and do the right thing with shadow files etc on at least NetBSD,SunOS,
HP-UX etc  I have another script which outputs /etc/passwd(+shadow)
on various systems in v7 format so that they can be fed into tools like and Crack :-)

Oh and adduser understands passwd aging on several systems and can be 
configured to set a passwd that will expire on first login.
You can have it populate home dirs etc - it is very flexible.
It uses the systems vipw etc if available (except on Solaris where
vipw is totally broken).

If you have pkgsrc then just install addnerd.