Skip to content

Conversation

adamcstephens
Copy link
Contributor

@adamcstephens adamcstephens commented Aug 5, 2025

When running su -l, sudo-rs maps that to a pam.d/su-l file.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Aug 5, 2025
@adamcstephens adamcstephens deleted the push-ortmtkwruovm branch August 8, 2025 19:54
@adamcstephens adamcstephens restored the push-ortmtkwruovm branch August 18, 2025 12:21
@adamcstephens adamcstephens reopened this Aug 18, 2025
@adamcstephens
Copy link
Contributor Author

I did not mean to close this. Apparently it got caught in my fork cleanup.

@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Aug 18, 2025
@normalcea
Copy link
Contributor

Can you explain this change in more detail? I don't quite understand it.

@r-vdp
Copy link
Contributor

r-vdp commented Aug 24, 2025

Looks good in principle, but I'm wondering why you set different default settings than what we have for the other sudo-rs pam services? Is there any reference for this?

@adamcstephens
Copy link
Contributor Author

Can you explain this change in more detail? I don't quite understand it.

My goal is to fix being able to run su -l, specifically in the context of entering an Incus instances.

𑁱 incus shell worker1
su: Authentication failed, try again.
su: Authentication failed, try again.
su: Maximum 3 incorrect authentication attempts

𑁱 incus alias list
+-------+----------------------+
| ALIAS |        TARGET        |
+-------+----------------------+
| shell | exec @ARGS@ -- su -l |
+-------+----------------------+

Which generates this error, indicating it's attempting to use the su-l service. This service isn't necessary for sudo, but apparently is for sudo-rs.

Aug 24 13:31:50 worker1 su[313036]: pam_warn(su-l:auth): function=[pam_sm_authenticate] flags=0x8001 service=[su-l] terminal=[/dev/pts/6] user=[root] ruser=[root] rhost=[<unknown>]

Looks good in principle, but I'm wondering why you set different default settings than what we have for the other sudo-rs pam services? Is there any reference for this?

I opted for these settings as they are the su settings in shadow.nix.

Copy link
Contributor

@r-vdp r-vdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Aug 24, 2025
@adamcstephens adamcstephens merged commit 8aaa86b into NixOS:master Aug 24, 2025
56 of 57 checks passed
@adamcstephens adamcstephens deleted the push-ortmtkwruovm branch August 25, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants