Subject: Re: Hesiod passwd entries and login classes -- don't seem to mix?
To: Greg Hudson <>
From: Geoff Adams <>
List: current-users
Date: 02/09/2000 04:43:27
On 2/8/00 10:14 AM, Greg Hudson at ghudson@MIT.EDU wrote:

>> Besides, doing an ls -l of a directory which contains files owned by
>> 5000 different users (think: /export/home) is *much* faster if you
>> do the uid->username lookups in Hesiod rather than in the flat file
>> that is /etc/passwd.  Try it!
> NetBSD doesn't look things up in the flat file which is /etc/passwd.
> It uses /etc/pwd.db or (if it can read it) /etc/spwd.db.  I'm a little
> surprised that Hesiod is faster, but db might turn out to impose more
> overhead than the resolver library and named.

Ah, of course you're right.  I tested this under SunOS (remember *that*?),
which does use a flat file, which turns out to be orders of magnitude slower
(seek(fd, 0, SEEK_SET) and reread; repeat until insane).  I wonder how
pwd.db holds up ... I'll have to test it.

Thanks to those who have taken the time to read and reply to my message.
I'm still pondering the several replies so far.  It looks like everyone has
come up with their own local solution, and that there's no clear generic way
to make all systems (NetBSD and otherwise) happy, and yet have the desired


- Geoff