Using /etc/passwd and /etc/passwd.cache

204 views
Skip to first unread message

Kamil Kisiel

unread,
Mar 17, 2008, 8:14:14 PM3/17/08
to nsscache-discuss
Hi, it's me again :)

We're about this >< close to deploying nsscache on some of the systems
at our company here. The last hurdle to overcome is this: How do I
use /etc/passwd and /etc/passwd.cache (and similarly for group) at the
same time? Reason for this being that our machines have local user
accounts for system services. and then we have our organization-wide
accounts.

I can do the db method, but in our distro of choice (Gentoo) the
libnss-db package isn't considered stable on x86_64, so I'd prefer to
go the files route.

V Hoffman

unread,
Mar 21, 2008, 2:00:48 PM3/21/08
to nsscache...@googlegroups.com
Hi,

Working on it -- if all goes well today, I should be able to upload
something to code RSN... sorry about the wait!

The answer, btw, is a small wrapper library called libnss_cache.so
which we haven't previously released.

cheers,

-V

Kamil Kisiel

unread,
Mar 22, 2008, 2:07:27 PM3/22/08
to nsscache-discuss
Sounds good, I can't wait to give it a shot. Thanks again for all your
support.

On Mar 21, 11:00 am, "V Hoffman" <projectvolt...@gmail.com> wrote:
> Hi,
>
> Working on it -- if all goes well today, I should be able to upload
> something to code RSN... sorry about the wait!
>
> The answer, btw, is a small wrapper library called libnss_cache.so
> which we haven't previously released.
>
> cheers,
>
> -V
>

V Hoffman

unread,
Mar 22, 2008, 11:55:07 PM3/22/08
to nsscache...@googlegroups.com
done! I'll sync stuff to svn, but I stuck a tarball up there under
'downloads', called libnss-cache-0.1.tar.gz

untar it, than you can either build a deb or just make the lib and
distribute/package it yourself. see the 'BUILD' doc -- it's raw,
but it works. the library has been pretty stable in my experience, we
fixed the only bug we found so far (had to rewind a pointer skipping
around for large map entries). as far as wrappers go, it's not
terribly complex so it simple outta keep the bugs down.

in nsswitch.conf, you can append 'cache' as an nss source, e.g.

passwd: files cache
shadow: files cache
group: files cache

let me know if there are any problems or you have yearnings for an rpm
or something.

I'll upload it to svn as well, you are welcome to send patches of
course :) *grin*

cheers,

-V

Kamil Kisiel

unread,
Mar 27, 2008, 2:24:13 AM3/27/08
to nsscache-discuss
Thanks for the upload. I tested it and it appears to work great. I
still have some other infrastructure pieces to put in place on our
network before doing a full roll-out, but it looks extremely
promising. I'll let you know how it works and send some patches your
way. At the very least I'll have some ebuilds for Gentoo deployment
that I'll have created for our internal use and could be contributed
back. I'll probably be writing a step-by-step guide for our internal
documentation and can send that your way too if you'd like.

On Mar 22, 8:55 pm, "V Hoffman" <projectvolt...@gmail.com> wrote:
> done!  I'll sync stuff to svn, but I stuck a tarball up there under
> 'downloads', called libnss-cache-0.1.tar.gz
>
> untar it, than you can either build a deb or just make the lib and
> distribute/package it yourself.    see the 'BUILD' doc -- it's raw,
> but it works.  the library has been pretty stable in my experience, we
> fixed the only bug we found so far (had to rewind a pointer skipping
> around for large map entries).  as far as wrappers go, it's not
> terribly complex so it simple outta keep the bugs down.
>
> in nsswitch.conf, you can append 'cache' as an nss source, e.g.
>
> passwd:     files cache
> shadow:     files cache
> group:      files cache
>
> let me know if there are any problems or you have yearnings for an rpm
> or something.
>
> I'll upload it to svn as well, you are welcome to send patches of
> course :) *grin*
>
> cheers,
>
> -V
>

V Hoffman

unread,
Mar 27, 2008, 3:18:10 AM3/27/08
to nsscache...@googlegroups.com
great! documentation (step by step guide) would be especially
coveted; it's hard to write when you are on the "inside" and make
certain assumptions without even realizing it :)

also, I just worked on a suite of patches aimed at memory
efficiency... cut down the memory footprint for very large maps by
something on the order of 3x, depending. I wasn't focused on speed
(will do that later) but as a side effect I definately saw a speed
boost for full and partial updates. don't know the size of your maps,
but hey, it never hurts. I'll get it uploaded this week.

I think I should upload a prebuilt stock deb and rpm, as well as see
about contributing a deb package upstream. it should make life a lot
easier if this is just an "apt-get" away for more folks -- add that to
your gentoo ebuild and that's a good chunk covered. maybe this
weekend, heh :)

cheers,

-V

Reply all
Reply to author
Forward
0 new messages