Project:Toolchain/Glibc 2.26 porting notes/nsswitch.conf in glibc-2.26

TL;DR (the fix)
Make sure the file contains   entry:

Good:

Also good:

Bad:

What is broken
If you have compat database only listed as a service resolver and install glibc-2.26 most programs will fail to resolve users and groups: login, ssh and so on will fail.

One of many manifestations of the problem:

Why the breakage
Details can be seen at

glibc-2.26 deprecates obsolete NSL libraries. (in this case libnss_compat.so.2 gone away)

Gentoo happened not to change since 2006.

Normally is installed and updated by glibc ebuild when both conditions are met:


 * is set in
 * has no user modifications (kept as installed by glibc)

To be extra cautious glibc ebuild fails as TODO.

To update the simplest is to add files entry into every line using compat. Example fix: