From nobody  Thu Nov 12 17:06:39 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id RAA25314;
          Thu, 12 Nov 1998 17:06:39 -0800 (PST)
          (envelope-from nobody)
Message-Id: <199811130106.RAA25314@hub.freebsd.org>
Date: Thu, 12 Nov 1998 17:06:39 -0800 (PST)
From: venzi@abac.com
To: freebsd-gnats-submit@freebsd.org
Subject: adduser is very slow if the system has several thousand accounts
X-Send-Pr-Version: www-1.0

>Number:         8672
>Category:       misc
>Synopsis:       adduser is very slow if the system has several thousand accounts
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 12 17:10:00 PST 1998
>Closed-Date:    Fri Mar 5 03:04:55 PST 1999
>Last-Modified:  Fri Mar  5 03:05:27 PST 1999
>Originator:     Venzi
>Release:        2.2.6
>Organization:
A+Net
>Environment:
FreeBSD 2.2.6-RELEASE FreeBSD 2.2.6-RELEASE #0: Thu Jun 11 13:53:04 PDT 1998 i386
>Description:
The adduser command is very inefficient... while I appreciate
that authentication is (theoretically) faster when using DB files
instead of plain text like on sysV systems, it takes about 10
minutes to build a new account on a 15,000 user system. Now
obviously the problem is that every time adduser builds the whole
databases using pwd_mkdb instead of adding just one user entry
(which would be really fast). 'pw' does the exact same thing.

>How-To-Repeat:
create 15,000 random users and try to add another one :)
>Fix:
I think it's about time somebody writes a binary useradd command
which doesn't use pwd_mkdb
I might eventually have to write one myself but it would be nice
to know whether somebody is working on that.

>Release-Note:
>Audit-Trail:

From: webmaster@abac.com
To: freebsd-gnats-submit@freebsd.org
Cc:  Subject: Re: misc/8672: adduser is very slow if the system has several thousand 
 accounts
Date: Wed, 25 Nov 1998 11:25:57 -0800

 I wrote a System V compatible `useradd' command and submitted
 it as a port (ports/8864). It's much more efficient than adduser
 for adding a single user, and a lot easier to use in scripts.
 It's not really a port, because I wrote it from scratch (and of
 course it will only work on BSD systems). Haven't tested it very
 much but it seems to work fine.
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Fri Mar 5 03:04:55 PST 1999 
State-Changed-Why:  
2.2 branch no longer under active development. Contributions welcome for 
an improved adduser for CURRENT. 
>Unformatted:
