Indeed, something seems off in the way my message was formatted, I've
tried again in this message with the html formatting dumped.
Here is the nsswitch.conf (the relavant bits):
$ cat /etc/nsswitch.conf
passwd: files cache
group: files cache
shadow: files
By config I'm not sure what you mean, I edited nsswitch.conf with a
text-editor. I generated
/etc/{passwd,group}.cache{,.ixname,ix{gid,uid}} with some code written
in Golang available here:
https://git.michaelwashere.net/NetAuth/nsscached/src/branch/master/cmd/nsscached/main.go#L103.
I have not used nsscache verify as I suspect that since I didn't use it
to generate the file in the first place it won't do the right thing.
I suspect my code has an error in it though as I have to rm the .ix*
files to get things to work correctly. However if I remove the index
files, then getent works. I assume for the moment that I can operate
without the indexes and things work, just slower.
The contents of /etc/passwd.cache and /etc/group.cache are:
$ cat /etc/passwd.cache
foo:x:10000:5000:::
$ cat /etc/group.cache
mygroup:x:5000:foo
This is a test VM with just the directory service and one user in it, so
that is what I expect these files to contain.
Here's the output of strace when trying to su:
https://hastebin.com/omabidocib.erl
It reads the passwd.cache file, but I don't see anything out of the
ordinary that would be a crash here. My /etc/security/limits.conf is
blank, and I've also tested this with login(1) which should definitely
go through NSS, so I'm at a bit of a loss here.