| 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: 06/29/2025 |
| 6 |
.\" Manual: Linux-PAM Manual |
| 7 |
.\" Source: Linux-PAM |
| 8 |
.\" Language: English |
| 9 |
.\" |
| 10 |
.TH "PAM_MKHOMEDIR" "8" "06/29/2025" "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 |
The new users home directory will not be removed after logout of the user\&. |
| 41 |
.SH "OPTIONS" |
| 42 |
.PP |
| 43 |
silent |
| 44 |
.RS 4 |
| 45 |
Don\*(Aqt print informative messages\&. |
| 46 |
.RE |
| 47 |
.PP |
| 48 |
debug |
| 49 |
.RS 4 |
| 50 |
Turns on debugging via |
| 51 |
\fBsyslog\fR(3)\&. |
| 52 |
.RE |
| 53 |
.PP |
| 54 |
umask=mask |
| 55 |
.RS 4 |
| 56 |
The file mode creation mask is set to |
| 57 |
\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 |
| 58 |
\fBHOME_MODE\fR |
| 59 |
configuration item from |
| 60 |
/etc/login\&.defs\&. If there is no such configuration item then the value is computed from the value of |
| 61 |
\fBUMASK\fR |
| 62 |
in the same file\&. If there is no such configuration option either the default value of 0755 is used for the mode\&. |
| 63 |
.RE |
| 64 |
.PP |
| 65 |
skel=/path/to/skel/directory |
| 66 |
.RS 4 |
| 67 |
Indicate an alternative |
| 68 |
skel |
| 69 |
directory to override the default |
| 70 |
/etc/skel\&. |
| 71 |
.RE |
| 72 |
.SH "MODULE TYPES PROVIDED" |
| 73 |
.PP |
| 74 |
Only the |
| 75 |
\fBsession\fR |
| 76 |
module type is provided\&. |
| 77 |
.SH "RETURN VALUES" |
| 78 |
.PP |
| 79 |
PAM_BUF_ERR |
| 80 |
.RS 4 |
| 81 |
Memory buffer error\&. |
| 82 |
.RE |
| 83 |
.PP |
| 84 |
PAM_PERM_DENIED |
| 85 |
.RS 4 |
| 86 |
Not enough permissions to create the new directory or read the skel directory\&. |
| 87 |
.RE |
| 88 |
.PP |
| 89 |
PAM_USER_UNKNOWN |
| 90 |
.RS 4 |
| 91 |
User not known to the underlying authentication module\&. |
| 92 |
.RE |
| 93 |
.PP |
| 94 |
PAM_SUCCESS |
| 95 |
.RS 4 |
| 96 |
Environment variables were set\&. |
| 97 |
.RE |
| 98 |
.SH "FILES" |
| 99 |
.PP |
| 100 |
/etc/skel |
| 101 |
.RS 4 |
| 102 |
Default skel directory |
| 103 |
.RE |
| 104 |
.SH "EXAMPLES" |
| 105 |
.PP |
| 106 |
A sample /etc/pam\&.d/login file: |
| 107 |
.sp |
| 108 |
.if n \{\ |
| 109 |
.RS 4 |
| 110 |
.\} |
| 111 |
.nf |
| 112 |
auth requisite pam_securetty\&.so |
| 113 |
auth sufficient pam_ldap\&.so |
| 114 |
auth required pam_unix\&.so |
| 115 |
auth required pam_nologin\&.so |
| 116 |
account sufficient pam_ldap\&.so |
| 117 |
account required pam_unix\&.so |
| 118 |
password required pam_unix\&.so |
| 119 |
session required pam_mkhomedir\&.so skel=/etc/skel/ umask=0022 |
| 120 |
session required pam_unix\&.so |
| 121 |
session optional pam_lastlog\&.so |
| 122 |
session optional pam_mail\&.so standard |
| 123 |
|
| 124 |
.fi |
| 125 |
.if n \{\ |
| 126 |
.RE |
| 127 |
.\} |
| 128 |
.sp |
| 129 |
.SH "SEE ALSO" |
| 130 |
.PP |
| 131 |
\fBpam.d\fR(5), |
| 132 |
\fBpam\fR(7)\&. |
| 133 |
.SH "AUTHOR" |
| 134 |
.PP |
| 135 |
pam_mkhomedir was written by Jason Gunthorpe <jgg@debian\&.org>\&. |