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

Why is pam_unix required, even if unixAuth = false #104346

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions nixos/modules/security/pam.nix
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ let
text = mkDefault
(''
# Account management.
account required pam_unix.so
${optionalString unixAuth
"account required pam_unix.so"}
${optionalString use_ldap
"account sufficient ${pam_ldap}/lib/security/pam_ldap.so"}
${optionalString (config.services.sssd.enable && cfg.sssdStrictAccess==false)
Expand Down Expand Up @@ -424,7 +425,8 @@ let
|| cfg.googleAuthenticator.enable
|| cfg.gnupg.enable
|| cfg.duoSecurity.enable)) ''
auth required pam_unix.so ${optionalString cfg.allowNullPassword "nullok"} ${optionalString cfg.nodelay "nodelay"} likeauth
${optionalString unixAuth
"auth required pam_unix.so ${optionalString cfg.allowNullPassword "nullok"} ${optionalString cfg.nodelay "nodelay"} likeauth"}
${optionalString config.security.pam.enableEcryptfs
"auth optional ${pkgs.ecryptfs}/lib/security/pam_ecryptfs.so unwrap"}
${optionalString cfg.pamMount
Expand Down Expand Up @@ -477,7 +479,8 @@ let
${optionalString cfg.setEnvironment ''
session required pam_env.so conffile=${config.system.build.pamEnvironment} readenv=0
''}
session required pam_unix.so
${optionalString unixAuth
"session required pam_unix.so"}
${optionalString cfg.setLoginUid
"session ${
if config.boot.isContainer then "optional" else "required"
Expand Down