| 1 |
'\" t |
| 2 |
.\" Title: pam_ftp |
| 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_FTP" "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_ftp \- PAM module for anonymous access module |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.HP \w'\fBpam_ftp\&.so\fR\ 'u |
| 34 |
\fBpam_ftp\&.so\fR [debug] [ignore] [users=\fIXXX,YYY,\fR...] |
| 35 |
.SH "DESCRIPTION" |
| 36 |
.PP |
| 37 |
pam_ftp is a PAM module which provides a pluggable anonymous ftp mode of access\&. |
| 38 |
.PP |
| 39 |
This module intercepts the user\*(Aqs name and password\&. If the name is |
| 40 |
\fIftp\fR |
| 41 |
or |
| 42 |
\fIanonymous\fR, the user\*(Aqs password is broken up at the |
| 43 |
\fI@\fR |
| 44 |
delimiter into a |
| 45 |
\fIPAM_RUSER\fR |
| 46 |
and a |
| 47 |
\fIPAM_RHOST\fR |
| 48 |
part; these pam\-items being set accordingly\&. The username (\fIPAM_USER\fR) is set to |
| 49 |
\fIftp\fR\&. In this case the module succeeds\&. Alternatively, the module sets the |
| 50 |
\fIPAM_AUTHTOK\fR |
| 51 |
item with the entered password and fails\&. |
| 52 |
.PP |
| 53 |
This module is not safe and easily spoofable\&. |
| 54 |
.SH "OPTIONS" |
| 55 |
.PP |
| 56 |
.PP |
| 57 |
debug |
| 58 |
.RS 4 |
| 59 |
Print debug information\&. |
| 60 |
.RE |
| 61 |
.PP |
| 62 |
ignore |
| 63 |
.RS 4 |
| 64 |
Pay no attention to the email address of the user (if supplied)\&. |
| 65 |
.RE |
| 66 |
.PP |
| 67 |
ftp=XXX,YYY,\&.\&.\&. |
| 68 |
.RS 4 |
| 69 |
Instead of |
| 70 |
\fIftp\fR |
| 71 |
or |
| 72 |
\fIanonymous\fR, provide anonymous login to the comma separated list of users: |
| 73 |
\fB\fIXXX,YYY,\&.\&.\&.\fR\fR\&. Should the applicant enter one of these usernames the returned username is set to the first in the list: |
| 74 |
\fIXXX\fR\&. |
| 75 |
.RE |
| 76 |
.SH "MODULE TYPES PROVIDED" |
| 77 |
.PP |
| 78 |
Only the |
| 79 |
\fBauth\fR |
| 80 |
module type is provided\&. |
| 81 |
.SH "RETURN VALUES" |
| 82 |
.PP |
| 83 |
.PP |
| 84 |
PAM_SUCCESS |
| 85 |
.RS 4 |
| 86 |
The authentication was successful\&. |
| 87 |
.RE |
| 88 |
.PP |
| 89 |
PAM_USER_UNKNOWN |
| 90 |
.RS 4 |
| 91 |
User not known\&. |
| 92 |
.RE |
| 93 |
.SH "EXAMPLES" |
| 94 |
.PP |
| 95 |
Add the following line to |
| 96 |
/etc/pam\&.d/ftpd |
| 97 |
to handle ftp style anonymous login: |
| 98 |
.sp |
| 99 |
.if n \{\ |
| 100 |
.RS 4 |
| 101 |
.\} |
| 102 |
.nf |
| 103 |
# |
| 104 |
# ftpd; add ftp\-specifics\&. These lines enable anonymous ftp over |
| 105 |
# standard UN*X access (the listfile entry blocks access to |
| 106 |
# users listed in /etc/ftpusers) |
| 107 |
# |
| 108 |
auth sufficient pam_ftp\&.so |
| 109 |
auth required pam_unix\&.so use_first_pass |
| 110 |
auth required pam_listfile\&.so \e |
| 111 |
onerr=succeed item=user sense=deny file=/etc/ftpusers |
| 112 |
|
| 113 |
.fi |
| 114 |
.if n \{\ |
| 115 |
.RE |
| 116 |
.\} |
| 117 |
.sp |
| 118 |
.SH "SEE ALSO" |
| 119 |
.PP |
| 120 |
\fBpam.conf\fR(5), |
| 121 |
\fBpam.d\fR(5), |
| 122 |
\fBpam\fR(7) |
| 123 |
.SH "AUTHOR" |
| 124 |
.PP |
| 125 |
pam_ftp was written by Andrew G\&. Morgan <morgan@kernel\&.org>\&. |