mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
* We still need /etc/pam.d/other to keep usermod happy.
svn path=/nixos/trunk/; revision=16731
This commit is contained in:
parent
2884c9a836
commit
3b931f7861
@ -18,6 +18,18 @@ let
|
||||
|
||||
pamConsolePerms = ./console.perms;
|
||||
|
||||
otherService = pkgs.writeText "other.pam"
|
||||
''
|
||||
auth required pam_warn.so
|
||||
auth required pam_deny.so
|
||||
account required pam_warn.so
|
||||
account required pam_deny.so
|
||||
password required pam_warn.so
|
||||
password required pam_deny.so
|
||||
session required pam_warn.so
|
||||
session required pam_deny.so
|
||||
'';
|
||||
|
||||
makePAMService =
|
||||
{ name
|
||||
, # If set, root doesn't need to authenticate (e.g. for the "chsh"
|
||||
@ -111,7 +123,12 @@ in
|
||||
[ pkgs.pam pam_unix2 ]
|
||||
++ optional config.users.ldap.enable pam_ldap;
|
||||
|
||||
environment.etc = map makePAMService config.security.pam.services;
|
||||
environment.etc =
|
||||
map makePAMService config.security.pam.services
|
||||
++ singleton
|
||||
{ source = otherService;
|
||||
target = "pam.d/other";
|
||||
};
|
||||
|
||||
security.pam.services =
|
||||
# Most of these should be moved to specific modules.
|
||||
|
Loading…
Reference in New Issue
Block a user