Subject: Re: root vs. /etc/pwd.db vs. /etc/spwd.db.
To: None <tech-userlevel@NetBSD.ORG>
From: Christoph Badura <email@example.com>
Date: 09/05/1997 12:41:56
firstname.lastname@example.org (matthew green) writes:
>so, our libc code only looks at /etc/spwd.db if we are running as root,
>which is annoying if running under a chroot environment where we only
>care about the uid <-> name mapping, and thus only provide a /etc/pwd.db
>in the chroot area. the patch below fixes this problem for me.
If you are creating a customised password data base for the chrooted
area with "pwd_mkdb -d" (which is probably a good idea in most cases),
this is a non issue.
If you are just copying /etc/pwd.db to the chrooted area, you can create
a link to spwd.db which works as well.
Why do we need a third fix for this problem?
Now available in print: Lion's Commentary on UNIX 6th Edition, with Source Code