aboutsummaryrefslogtreecommitdiff
path: root/files/usr/local/libexec/pam-create-local-homedir.common
diff options
context:
space:
mode:
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