SUMMARY: How to create a database of /etc/passwd file

From: Joel Turoff (
Date: Fri Jan 09 1998 - 04:52:05 CST


First, thanks to the following for their help:

Dave McFerren <>
Dave McFerren <>
Eugene Kramer <>
Jacques Beigbeder <>
Tim Carlson <>
Bob Radvanovsky <> (Emy Parparita)
"Karl E. Vogel" <>
Geoff Weller <>
Bob Bridgham <>
"Ade E Oyeyemi"<>

Here's my original post:

I am looking for information on how to generate a binary database of the
/etc/passwd and /etc/shadow files to speed up lookups when users login, pop
their email, etc.

AIX has a nice command called 'mkpasswd' which generates a passwd.dir and
passwd.pag file for efficient searches.

Anyone know of a similar program for Solaris.



Most people recommended using the "makedbm" program to generate NIS style
password databases. This appears to be the standard Solaris solution to
this problem.

But the servers I want to create database password files on are Internet
servers, and the CERT Organization strongly recommends *NOT* using NIS or
NIS+ on any server directly connected to the Internet, which I agree with.
Also, it would be necessary to rewrite all the programs that consult the
password file so that they looked at dbm databases.

Our main problem was with users checking their email accounts.
Consequenly, what we are going to try is to re-write popper so that it can
check dbm databases created with the makedbm command. I'd be very
interested to hear from anyone out there who has done this.

Karl Vogel also introduced me to an interesting suite available on the
Internet that others might find useful for this type of project:

   "You can get DBM password file stuff in the shadow login suite by John
   Haugh. Two places to look:

            Location: /usenet/comp.sources.misc/volume26
              DIRECTORY drwxrwxr-x 512 Nov 26 04:41 shadow
            Location: /pub/comp.sources.misc/volume26
              DIRECTORY dr-xr-xr-x 512 Dec 15 13:42 shadow"

Thanks everyone!


This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:30 CDT