[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: db of /etc/passwd and /etc/group



On Sat, Jan 09, 1999 at 03:27:17PM +0000, Russell Coker wrote:
> If a system contains a nsswitch.conf file similar to the snippet
> I've included below then would it be possible for utilities such as
> adduser, passwd, and vipw to run appropriate makedb commands to keep
> the database in sync?  Or is there something wrong with desiring this
> type of functionality?

the only thing i have against this idea is that it takes a long time to
generate the db files.

if passwd and others did that for every change, then it could take
several minutes (depending on the size of passwd and shadow files) for
every one...instead of less than a second.

it would often be better to make several changes (e.g. 5 new users, 3
changed passwords, 7 deleted users) in a batch and then run make in
/var/db.


root /var/db# wc -l /etc/passwd /etc/shadow
   4924 /etc/passwd
   4925 /etc/shadow
   9849 total
root /var/db# touch /etc/passwd /etc/shadow
root /var/db# time make
passwd... done.
shadow... done.

real  0m38.922s
user  0m1.800s
sys   0m4.760s

that's a long time to wait between commands.

craig

--
craig sanders


Reply to: