summaryrefslogtreecommitdiff
path: root/repo/system/pam.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-01-18 17:41:38 +0000
committerdavidovski <david@davidovski.xyz>2022-01-18 17:41:38 +0000
commita2f22c928eb1aaede9541327d4ae0d3d1972cad5 (patch)
treeb7bc28f51e108279f4162ea19a4a2bcd77c3056d /repo/system/pam.xibuild
parent6da2b8fc249ebdc09293735dabcab4d3c4b379c3 (diff)
added postinstall configs for linux pam
Diffstat (limited to 'repo/system/pam.xibuild')
-rw-r--r--repo/system/pam.xibuild41
1 files changed, 36 insertions, 5 deletions
diff --git a/repo/system/pam.xibuild b/repo/system/pam.xibuild
index 833e4a2..ea7e882 100644
--- a/repo/system/pam.xibuild
+++ b/repo/system/pam.xibuild
@@ -28,12 +28,43 @@ package () {
make DESTDIR=$PKG_DEST install
install -v -m755 -d $PKG_DEST/etc/pam.d &&
+}
+
+postinstall () {
+
+ install -vdm755 /etc/pam.d &&
+ cat > /etc/pam.d/system-account << "EOF" &&
+# Begin /etc/pam.d/system-account
+
+account required pam_unix.so
+
+# End /etc/pam.d/system-account
+EOF
+
+ cat > /etc/pam.d/system-auth << "EOF" &&
+# Begin /etc/pam.d/system-auth
+
+auth required pam_unix.so
+
+# End /etc/pam.d/system-auth
+EOF
+
+ cat > /etc/pam.d/system-session << "EOF"
+# Begin /etc/pam.d/system-session
+
+session required pam_unix.so
+
+# End /etc/pam.d/system-session
+EOF
+
+ cat > /etc/pam.d/system-password << "EOF"
+# Begin /etc/pam.d/system-password
+
+# use sha512 hash for encryption, use shadow, and try to use any previously
+# defined authentication token (chosen password) set by any prior module
+password required pam_unix.so sha512 shadow try_first_pass
- cat > $PKG_DEST/etc/pam.d/other << "EOF"
- auth required pam_deny.so
- account required pam_deny.so
- password required pam_deny.so
- session required pam_deny.so
+# End /etc/pam.d/system-password
EOF
}