git.iko.soy/typeable/nixpkgs
on master help sign in
pam_mount: do not re-prompt for password

nixos-rebuild test causes pam_mount to prompt for a password when running with an encrypted home: building '/nix/store/p6bflh7n5zy2dql8l45mix9qnzq65hbk-nixos-system-mildred-18.09.git.98592c5da79M.drv'... activating the configuration... setting up /etc... reenter password for pam_mount: (mount.c:68): Messages from underlying mount program: (mount.c:72): crypt_activate_by_passphrase: File exists (pam_mount.c:522): mount of /dev/mapper/vg0-lv_home_peter failed kbuildsycoca5 running... This change makes pam_mount not prompt. It still tries to remount (and fails in the process) but that message can be ignored. Fixes: #44586

commit22a500a3f87bbce73bd8d777ef920b43a636f018 authorPeter Hoeg <peter@hoeg.com> dateWed 10 Jun 2020, 10:55 (6 years ago) parent4cdfe28
1 file changed+2−2
nixos/modules/security/pam.nix+2−2
nixos/modules/security/pam.nix+2−2
@@ -428,7 +428,7 @@ let
428428 ${optionalString config.security.pam.enableEcryptfs
429429 "auth optional ${pkgs.ecryptfs}/lib/security/pam_ecryptfs.so unwrap"}
430430 ${optionalString cfg.pamMount
431− "auth optional ${pkgs.pam_mount}/lib/security/pam_mount.so"}
431+ "auth optional ${pkgs.pam_mount}/lib/security/pam_mount.so disable_interactive"}
432432 ${optionalString cfg.enableKwallet
433433 ("auth optional ${pkgs.plasma5Packages.kwallet-pam}/lib/security/pam_kwallet5.so" +
434434 " kwalletd=${pkgs.plasma5Packages.kwallet.bin}/bin/kwalletd5")}
@@ -489,7 +489,7 @@ let
489489 ${optionalString config.security.pam.enableEcryptfs
490490 "session optional ${pkgs.ecryptfs}/lib/security/pam_ecryptfs.so"}
491491 ${optionalString cfg.pamMount
492− "session optional ${pkgs.pam_mount}/lib/security/pam_mount.so"}
492+ "session optional ${pkgs.pam_mount}/lib/security/pam_mount.so disable_interactive"}
493493 ${optionalString use_ldap
494494 "session optional ${pam_ldap}/lib/security/pam_ldap.so"}
495495 ${optionalString config.services.sssd.enable