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

Calls to getpwuid() with an unknown UID fail with ENOENT #1466

jirwin opened this Issue Jul 19, 2016 · 1 comment


None yet
2 participants

jirwin commented Jul 19, 2016

Issue Report


When calling getpwuid() with an unknown UID, it fails with ENOENT because the file at /var/lib/sss/mc/passwd doesn't exist.

CoreOS Version

$ cat /etc/os-release
PRETTY_NAME="CoreOS 1068.6.0 (MoreOS)"


I've tested this on an EC2 instance as well as a Packet server.

Expected Behavior

I would expect my call to getpwuid() with an unknown UID to return an errno of 0, with a NULL resulting object because the user is not found.

Actual Behavior

Calling getpwuid() with an unknown UID returns an ENOENT when trying to look up the user in /var/lib/sss/mc/passwd after failing to find the user in /etc/passwd.

Reproduction Steps

I've created a small Go program that pulls the code from the os.user package.
You can view it here: It hardcodes a UID didn't exist on my server. Ensure it is run with a UID that doesn't exist to replicate the error.

Other Information

I've included the strace output of running the above program:

I'm fuzzy on what version I've seen this work as expected on before. I'd like to ballpark it around version 1032.1.0. My guess is that the introduction of sssd in 1045.0.0 is the cause of this change in behavior.


This comment has been minimized.

jirwin commented Jul 21, 2016


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment