mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
* Very basic PAM configuration. We now use Blowfish hashing for
/etc/shadow. svn path=/nixos/trunk/; revision=7306
This commit is contained in:
parent
06256e22d8
commit
f327b072cb
@ -234,7 +234,31 @@ rec {
|
||||
target = "event.d";
|
||||
}
|
||||
|
||||
];
|
||||
{ # Configuration for passwd and friends (e.g., hash algorithm
|
||||
# for /etc/passwd).
|
||||
source = ./etc/default/passwd;
|
||||
target = "default/passwd";
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
# A bunch of PAM configuration files for various programs.
|
||||
++ (map
|
||||
(program:
|
||||
{ source = pkgs.substituteAll {
|
||||
src = ./etc/pam.d + ("/" + program);
|
||||
inherit (pkgs) pam_unix2;
|
||||
};
|
||||
target = "pam.d/" + program;
|
||||
}
|
||||
)
|
||||
[
|
||||
"login"
|
||||
"passwd"
|
||||
"useradd"
|
||||
"other"
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
15
configuration/etc/default/passwd
Normal file
15
configuration/etc/default/passwd
Normal file
@ -0,0 +1,15 @@
|
||||
# Define default crypt hash
|
||||
# CRYPT={des,md5,blowfish}
|
||||
CRYPT=des
|
||||
|
||||
# for local files, use a more secure hash. We
|
||||
# don't need to be portable here:
|
||||
CRYPT_FILES=blowfish
|
||||
|
||||
# sometimes we need to specify special options for
|
||||
# a hash (variable is prepended by the name of the
|
||||
# crypt hash).
|
||||
BLOWFISH_CRYPT_FILES=10
|
||||
|
||||
# For NIS, we should always use DES:
|
||||
CRYPT_YP=des
|
4
configuration/etc/pam.d/login
Normal file
4
configuration/etc/pam.d/login
Normal file
@ -0,0 +1,4 @@
|
||||
auth required @pam_unix2@/lib/security/pam_unix2.so
|
||||
account required @pam_unix2@/lib/security/pam_unix2.so
|
||||
password required @pam_unix2@/lib/security/pam_unix2.so nullok use_first_pass use_authtok
|
||||
session required @pam_unix2@/lib/security/pam_unix2.so
|
8
configuration/etc/pam.d/other
Normal file
8
configuration/etc/pam.d/other
Normal file
@ -0,0 +1,8 @@
|
||||
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
|
4
configuration/etc/pam.d/passwd
Normal file
4
configuration/etc/pam.d/passwd
Normal file
@ -0,0 +1,4 @@
|
||||
auth required @pam_unix2@/lib/security/pam_unix2.so
|
||||
account required @pam_unix2@/lib/security/pam_unix2.so
|
||||
password required @pam_unix2@/lib/security/pam_unix2.so nullok debug
|
||||
session required @pam_unix2@/lib/security/pam_unix2.so
|
5
configuration/etc/pam.d/useradd
Normal file
5
configuration/etc/pam.d/useradd
Normal file
@ -0,0 +1,5 @@
|
||||
auth sufficient pam_rootok.so
|
||||
auth required pam_permit.so
|
||||
account required pam_permit.so
|
||||
password required pam_permit.so
|
||||
session required pam_permit.so
|
Loading…
Reference in New Issue
Block a user