Debian Codegraph @

upstream/opensuse-tumbleweed/man8/pam_mkhomedir.8

raw
1 '\" t
2 .\" Title: pam_mkhomedir
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
5 .\" Date: 05/26/2026
6 .\" Manual: Linux-PAM Manual
7 .\" Source: Linux-PAM
8 .\" Language: English
9 .\"
10 .TH "PAM_MKHOMEDIR" "8" "05/26/2026" "Linux\-PAM" "Linux\-PAM Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 pam_mkhomedir \- PAM module to create users home directory
32 .SH "SYNOPSIS"
33 .HP \w'\fBpam_mkhomedir\&.so\fR\ 'u
34 \fBpam_mkhomedir\&.so\fR [silent] [debug] [umask=\fImode\fR] [skel=\fIskeldir\fR]
35 .SH "DESCRIPTION"
36 .PP
37 The pam_mkhomedir PAM module will create a users home directory if it does not exist when the session begins\&. This allows users to be present in central database (such as NIS, kerberos or LDAP) without using a distributed file system or pre\-creating a large number of directories\&. The skeleton directory (usually
38 /etc/skel/) is used to copy default files and also sets a umask for the creation\&.
39 .PP
40 \fI/usr/etc/skel\fR
41 will also be used unless
42 \fIskel\fR
43 option is specified\&.
44 .PP
45 The new users home directory will not be removed after logout of the user\&.
46 .SH "OPTIONS"
47 .PP
48 silent
49 .RS 4
50 Don\*(Aqt print informative messages\&.
51 .RE
52 .PP
53 debug
54 .RS 4
55 Turns on debugging via
56 \fBsyslog\fR(3)\&.
57 .RE
58 .PP
59 umask=mask
60 .RS 4
61 The file mode creation mask is set to
62 \fImask\fR\&. The default value of mask is 0022\&. If this option is not specified, then the permissions of created user home directory is set to the value of
63 \fBHOME_MODE\fR
64 configuration item from
65 /etc/login\&.defs\&. If there is no such configuration item then the value is computed from the value of
66 \fBUMASK\fR
67 in the same file\&. If there is no such configuration option either the default value of 0755 is used for the mode\&.
68 .RE
69 .PP
70 skel=/path/to/skel/directory
71 .RS 4
72 Indicate an alternative
73 skel
74 directory to override the default
75 /etc/skel\&.
76 .RE
77 .SH "MODULE TYPES PROVIDED"
78 .PP
79 Only the
80 \fBsession\fR
81 module type is provided\&.
82 .SH "RETURN VALUES"
83 .PP
84 PAM_BUF_ERR
85 .RS 4
86 Memory buffer error\&.
87 .RE
88 .PP
89 PAM_PERM_DENIED
90 .RS 4
91 Not enough permissions to create the new directory or read the skel directory\&.
92 .RE
93 .PP
94 PAM_USER_UNKNOWN
95 .RS 4
96 User not known to the underlying authentication module\&.
97 .RE
98 .PP
99 PAM_SUCCESS
100 .RS 4
101 Environment variables were set\&.
102 .RE
103 .SH "FILES"
104 .PP
105 /etc/skel
106 .RS 4
107 Default skel directory
108 .RE
109 .SH "EXAMPLES"
110 .PP
111 A sample /etc/pam\&.d/login file:
112 .sp
113 .if n \{\
114 .RS 4
115 .\}
116 .nf
117 auth requisite pam_securetty\&.so
118 auth sufficient pam_ldap\&.so
119 auth required pam_unix\&.so
120 auth required pam_nologin\&.so
121 account sufficient pam_ldap\&.so
122 account required pam_unix\&.so
123 password required pam_unix\&.so
124 session required pam_mkhomedir\&.so skel=/etc/skel/ umask=0022
125 session required pam_unix\&.so
126 session optional pam_lastlog\&.so
127 session optional pam_mail\&.so standard
128
129 .fi
130 .if n \{\
131 .RE
132 .\}
133 .sp
134 .SH "SEE ALSO"
135 .PP
136 \fBpam.d\fR(5),
137 \fBpam\fR(8)\&.
138 .SH "AUTHOR"
139 .PP
140 pam_mkhomedir was written by Jason Gunthorpe <jgg@debian\&.org>\&.