-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On system with nsscache required "cannot find name for user" #36297
Comments
In NixOS, we enable NSCD and set |
Uhm, good to know. But in this case it's not a system service. Every
program that requires to find information from /etc/passwd seems to have a
dependency on it (whoami, sudo, ssh, etc.)... So I don't think I can change
the LD_LIBRARY_PATH of a single system
Sent from mobile. Please excuse my brevity.
On 4 Mar 2018 16:14, "Tuomas Tynkkynen" <notifications@github.com> wrote:
|
That was the suggestion; i.e. to enable NSCD as a system service from your distro. In fact if you do that, you don't even need to package nsscache at all and just use the version from your distro. |
I'm running into the same problem, but with |
I'd also love to know if there is a better solution than setting |
I've been using this successfully on RedHat 7.4 for the last 8+ months:
As @berdario mentions, the (I noticed that the If someone has suggestions for a pure solution I'd be eager to hear it! |
As suggested by @dezgeg, simply installing and enabling nscd on your distro (and disabling its caching as done in nixpkgs' nscd.conf will cause the glibc used for nix-built packages to use whatever nss modules are available on your system, including nsscache. |
Issue description
I just tried to use Nixops on a new system, this system is managed by puppet and has the following in
/etc/nsswitch.conf
:Which means that it's using the following nss module:
https://github.com/google/nsscache
https://github.com/google/libnss-cache
This has thus very similar symptoms (and workarounds) as #31700 but it's a different issue.
Running
strace
overwhoami
shows this:I see that nsscache is not available in nixpkgs, and I can thus volunteer to package it (when I'll find time for it, unfortunately). But even by having it available, I'm not sure what would be the best way forward:
Adding it as a dependency of glibc seems a bit heavy handed, given that most people won't need it. Should we expect users that require this to create an overlay to add it as a dependency of glibc? (but this means that all their packages will need to be rebuilt from scratch, without being able to rely on the binary caches)
A possible workaround is to set
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnss_cache.so.2
(or whatever is the path to the libnss_cache)Steps to reproduce
Technical details
"x86_64-linux"
Linux 4.9.0-5-amd64, Debian GNU/Linux, noversion
no
no
nix-env (Nix) 2.0
"nixpkgs-18.03pre129212.098c7f3d945"
/nix/store/lmg9r94g2dq9prd87n8jzcdga6nglmk7-cfc4fcf05293f15d02a1f6358e24ec389d7f9b30.tar.gz
The text was updated successfully, but these errors were encountered: