summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnicronNL <khagen@multi.eu>2017-09-02 14:06:16 +0200
committerUnicronNL <khagen@multi.eu>2017-09-02 14:06:16 +0200
commit51e4718ed2d77fcad6448fd09814e8e3272f10b4 (patch)
treec97b8d5eccaf0edd25cc889d269be92fe719cc9f
parentb29f025c58e202a59fbabeb7cd29a49a34f16837 (diff)
downloadvyos-build-51e4718ed2d77fcad6448fd09814e8e3272f10b4.tar.gz
vyos-build-51e4718ed2d77fcad6448fd09814e8e3272f10b4.zip
Create home directory on login
-rwxr-xr-xdata/live-build-config/hooks/22-pam_mkhomedir.chroot16
1 files changed, 16 insertions, 0 deletions
diff --git a/data/live-build-config/hooks/22-pam_mkhomedir.chroot b/data/live-build-config/hooks/22-pam_mkhomedir.chroot
new file mode 100755
index 00000000..af155ba4
--- /dev/null
+++ b/data/live-build-config/hooks/22-pam_mkhomedir.chroot
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+echo I: Create home directory on login.
+
+cat > /usr/share/pam-configs/mkhomedir <<EOF
+Name: Create home directory during login
+Default: yes
+Priority: 900
+Session-Type: Additional
+Session:
+ required pam_mkhomedir.so umask=0022 skel=/etc/skel
+EOF
+sync
+sed -i '/mkhomedir/d' /var/lib/pam/seen
+pam-auth-update --package
+