Skip to content
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

nixos: Confusion around the "su" command #1877

Closed
rickynils opened this issue Mar 4, 2014 · 4 comments
Closed

nixos: Confusion around the "su" command #1877

rickynils opened this issue Mar 4, 2014 · 4 comments
Labels
0.kind: bug Something is broken

Comments

@rickynils
Copy link
Member

There's a su command both in the shadow package and in util-linux, and they don't behave in exactly the same way. This means that if you don't have the shadow package installed (which is the case if users.mutableUsers = false), then su from util-linux is used. When you do su - user, it looks for /etc/pam.d/su-l, which is not setup on NixOS. Therefore, authentication fails. However, if you have shadow in systemPackages, su - works because it is not looking for /etc/pam.d/su-l.

I think NixOS should settle for one package and remove su from the others. I have no opinion on which package to settle on, though. There might also be other collisions for related binaries.

@wkennington
Copy link
Contributor

I assume this fixes #1813

@rickynils
Copy link
Member Author

@wkennington, yes this should fix #1813. The question is how it should be solved. The most reasonable solution, I think, is to split the shadow package into a user management part and a su part (with the multiple output feature of nix). Then the su part could be added unconditionally to systemPackages, and the user management part only if mutableUsers is true. Then, for good manners we should also remove su from `util-linux'. @edolstra, any opinions on this solution?

@shlevy
Copy link
Member

shlevy commented Apr 5, 2014

@rickynils Do you think you can implement this in time for the 14.04 branch?

@shlevy shlevy added the bug label Apr 5, 2014
@wkennington
Copy link
Contributor

I've implemented his change, waiting to test it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

3 participants