pam_mkhomedir.8 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. '\" t
  2. .\" Title: pam_mkhomedir
  3. .\" Author: [see the "AUTHOR" section]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
  5. .\" Date: 09/03/2021
  6. .\" Manual: Linux-PAM Manual
  7. .\" Source: Linux-PAM Manual
  8. .\" Language: English
  9. .\"
  10. .TH "PAM_MKHOMEDIR" "8" "09/03/2021" "Linux-PAM Manual" "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. \fBsilent\fR
  44. .RS 4
  45. Don\*(Aqt print informative messages\&.
  46. .RE
  47. .PP
  48. \fBdebug\fR
  49. .RS 4
  50. Turns on debugging via
  51. \fBsyslog\fR(3)\&.
  52. .RE
  53. .PP
  54. \fBumask=\fR\fB\fImask\fR\fR
  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. \fBskel=\fR\fB\fI/path/to/skel/directory\fR\fR
  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. .fi
  124. .if n \{\
  125. .RE
  126. .\}
  127. .sp
  128. .SH "SEE ALSO"
  129. .PP
  130. \fBpam.d\fR(5),
  131. \fBpam\fR(8)\&.
  132. .SH "AUTHOR"
  133. .PP
  134. pam_mkhomedir was written by Jason Gunthorpe <jgg@debian\&.org>\&.