1PAM_MKHOMEDIR(8) Linux-PAM Manual PAM_MKHOMEDIR(8)
2
3
4
6 pam_mkhomedir - PAM module to create users home directory
7
9 pam_mkhomedir.so [silent] [debug] [umask=mode] [skel=skeldir]
10
12 The pam_mkhomedir PAM module will create a users home directory if it
13 does not exist when the session begins. This allows users to be present
14 in central database (such as NIS, kerberos or LDAP) without using a
15 distributed file system or pre-creating a large number of directories.
16 The skeleton directory (usually /etc/skel/) is used to copy default
17 files and also sets a umask for the creation.
18
19 The new users home directory will not be removed after logout of the
20 user.
21
23 silent
24 Don't print informative messages.
25
26 debug
27 Turns on debugging via syslog(3).
28
29 umask=mask
30 The file mode creation mask is set to mask. The default value of
31 mask is 0022. If this option is not specified, then the permissions
32 of created user home directory is set to the value of HOME_MODE
33 configuration item from /etc/login.defs. If there is no such
34 configuration item then the value is computed from the value of
35 UMASK in the same file. If there is no such configuration option
36 either the default value of 0755 is used for the mode.
37
38 skel=/path/to/skel/directory
39 Indicate an alternative skel directory to override the default
40 /etc/skel.
41
43 Only the session module type is provided.
44
46 PAM_BUF_ERR
47 Memory buffer error.
48
49 PAM_PERM_DENIED
50 Not enough permissions to create the new directory or read the skel
51 directory.
52
53 PAM_USER_UNKNOWN
54 User not known to the underlying authentication module.
55
56 PAM_SUCCESS
57 Environment variables were set.
58
60 /etc/skel
61 Default skel directory
62
64 A sample /etc/pam.d/login file:
65
66 auth requisite pam_securetty.so
67 auth sufficient pam_ldap.so
68 auth required pam_unix.so
69 auth required pam_nologin.so
70 account sufficient pam_ldap.so
71 account required pam_unix.so
72 password required pam_unix.so
73 session required pam_mkhomedir.so skel=/etc/skel/ umask=0022
74 session required pam_unix.so
75 session optional pam_lastlog.so
76 session optional pam_mail.so standard
77
78
79
81 pam.d(5), pam(8).
82
84 pam_mkhomedir was written by Jason Gunthorpe <jgg@debian.org>.
85
86
87
88Linux-PAM Manual 09/03/2021 PAM_MKHOMEDIR(8)