Log console logins in /var/log/wtmp
This commit is contained in:
parent
14f55a2f67
commit
4be5fae2da
@ -91,7 +91,7 @@ in
|
|||||||
{ name = "groupmod"; rootOK = true; }
|
{ name = "groupmod"; rootOK = true; }
|
||||||
{ name = "groupmems"; rootOK = true; }
|
{ name = "groupmems"; rootOK = true; }
|
||||||
{ name = "groupdel"; rootOK = true; }
|
{ name = "groupdel"; rootOK = true; }
|
||||||
{ name = "login"; startSession = true; allowNullPassword = true; showMotd = true; }
|
{ name = "login"; startSession = true; allowNullPassword = true; showMotd = true; updateWtmp = true; }
|
||||||
];
|
];
|
||||||
|
|
||||||
security.setuidPrograms = [ "passwd" "chfn" "su" "newgrp" ];
|
security.setuidPrograms = [ "passwd" "chfn" "su" "newgrp" ];
|
||||||
|
@ -70,6 +70,8 @@ let
|
|||||||
limits ? config.security.pam.loginLimits
|
limits ? config.security.pam.loginLimits
|
||||||
, # Whether to show the message of the day.
|
, # Whether to show the message of the day.
|
||||||
showMotd ? false
|
showMotd ? false
|
||||||
|
, # Whether to update /var/log/wtmp.
|
||||||
|
updateWtmp ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{ source = pkgs.writeText "${name}.pam"
|
{ source = pkgs.writeText "${name}.pam"
|
||||||
@ -114,6 +116,8 @@ let
|
|||||||
|
|
||||||
# Session management.
|
# Session management.
|
||||||
session required pam_unix.so
|
session required pam_unix.so
|
||||||
|
${optionalString updateWtmp
|
||||||
|
"session required ${pkgs.pam}/lib/security/pam_lastlog.so silent"}
|
||||||
${optionalString config.users.ldap.enable
|
${optionalString config.users.ldap.enable
|
||||||
"session optional ${pam_ldap}/lib/security/pam_ldap.so"}
|
"session optional ${pam_ldap}/lib/security/pam_ldap.so"}
|
||||||
${optionalString config.krb5.enable
|
${optionalString config.krb5.enable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user