aboutsummaryrefslogtreecommitdiff
path: root/files/usr/local/libexec/pam-create-local-homedir.common
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-10-15 23:35:53 -0400
committerCullum Smith <cullum@sacredheartsc.com>2024-10-15 23:35:53 -0400
commit145668c3dd67c5271eddcb62d1e7843487d768a7 (patch)
tree4c7d563e9d320e6b122ee3dbf048d93eee6776c3 /files/usr/local/libexec/pam-create-local-homedir.common
parentb2af400a1098ebf445575d169e11a6717867045f (diff)
downloadinfrastructure-145668c3dd67c5271eddcb62d1e7843487d768a7.tar.gz
huge amount of fixes
Diffstat (limited to 'files/usr/local/libexec/pam-create-local-homedir.common')
-rw-r--r--files/usr/local/libexec/pam-create-local-homedir.common10
1 files changed, 10 insertions, 0 deletions
diff --git a/files/usr/local/libexec/pam-create-local-homedir.common b/files/usr/local/libexec/pam-create-local-homedir.common
new file mode 100644
index 0000000..a956d65
--- /dev/null
+++ b/files/usr/local/libexec/pam-create-local-homedir.common
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+uid=$(id -u "$PAM_USER")
+
+if [ "$uid" -ge 1000 ]; then
+ install -m 0755 -d /usr/local/home
+ install -o "$uid" -g "$uid" -m 0700 -d "/usr/local/home/${PAM_USER}"
+fi