Re: /lib/passwd



Hello,

Colin Walters <walters verbum org> writes:

> Well, we want to read *both* /etc/passwd and /lib/passwd.  I'm not sure
> how copying the source would make that easier.  Basically "adduser" or
> whatever should still modify /etc/passwd.

Ouch, I think my previous explanation was not clear enough O:-)

The idea would be to have a copy of the libnss_files sources, modify
the paths to make it read from /lib/{passwd,group,shadow,gshadow}
(instead of /etc), and call the built llibrary something like
libnss_altfiles.so.2; and finally make nsswitch.conf have:

  passwd: files altfiles
  group:  files altfiles
  shadow: files altfiles

That way, glibc functions will try the files in /etc first (so passwd
and the rest of existing tools would act on those), and when an user
name is not found, then the files in /lib would be tried.

Does it sound better now?

-- 
Adrian Perez <aperez igalia com> - Sent from my toaster
Igalia - Free Software Engineering

Attachment: pgp7Ie4NP0vT7.pgp
Description: PGP signature



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