summaryrefslogtreecommitdiffstats
path: root/modules/pam_issue/pam_issue.8
blob: 5d61a6436567d6e98f117f74a224f5dc2a32f171 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
'\" t
.\"     Title: pam_issue
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\"      Date: 05/18/2017
.\"    Manual: Linux-PAM Manual
.\"    Source: Linux-PAM Manual
.\"  Language: English
.\"
.TH "PAM_ISSUE" "8" "05/18/2017" "Linux-PAM Manual" "Linux\-PAM Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
pam_issue \- PAM module to add issue file to user prompt
.SH "SYNOPSIS"
.HP \w'\fBpam_issue\&.so\fR\ 'u
\fBpam_issue\&.so\fR [noesc] [issue=\fIissue\-file\-name\fR]
.SH "DESCRIPTION"
.PP
pam_issue is a PAM module to prepend an issue file to the username prompt\&. It also by default parses escape codes in the issue file similar to some common getty\*(Aqs (using \ex format)\&.
.PP
Recognized escapes:
.PP
\fB\ed\fR
.RS 4
current day
.RE
.PP
\fB\el\fR
.RS 4
name of this tty
.RE
.PP
\fB\em\fR
.RS 4
machine architecture (uname \-m)
.RE
.PP
\fB\en\fR
.RS 4
machine\*(Aqs network node hostname (uname \-n)
.RE
.PP
\fB\eo\fR
.RS 4
domain name of this system
.RE
.PP
\fB\er\fR
.RS 4
release number of operating system (uname \-r)
.RE
.PP
\fB\et\fR
.RS 4
current time
.RE
.PP
\fB\es\fR
.RS 4
operating system name (uname \-s)
.RE
.PP
\fB\eu\fR
.RS 4
number of users currently logged in
.RE
.PP
\fB\eU\fR
.RS 4
same as \eu except it is suffixed with "user" or "users" (eg\&. "1 user" or "10 users")
.RE
.PP
\fB\ev\fR
.RS 4
operating system version and build date (uname \-v)
.RE
.SH "OPTIONS"
.PP
.PP
\fBnoesc\fR
.RS 4
Turns off escape code parsing\&.
.RE
.PP
\fBissue=\fR\fB\fIissue\-file\-name\fR\fR
.RS 4
The file to output if not using the default\&.
.RE
.SH "MODULE TYPES PROVIDED"
.PP
Only the
\fBauth\fR
module type is provided\&.
.SH "RETURN VALUES"
.PP
.PP
PAM_BUF_ERR
.RS 4
Memory buffer error\&.
.RE
.PP
PAM_IGNORE
.RS 4
The prompt was already changed\&.
.RE
.PP
PAM_SERVICE_ERR
.RS 4
A service module error occurred\&.
.RE
.PP
PAM_SUCCESS
.RS 4
The new prompt was set successfully\&.
.RE
.SH "EXAMPLES"
.PP
Add the following line to
/etc/pam\&.d/login
to set the user specific issue at login:
.sp
.if n \{\
.RS 4
.\}
.nf
        auth optional pam_issue\&.so issue=/etc/issue
      
.fi
.if n \{\
.RE
.\}
.sp
.SH "SEE ALSO"
.PP
\fBpam.conf\fR(5),
\fBpam.d\fR(5),
\fBpam\fR(8)
.SH "AUTHOR"
.PP
pam_issue was written by Ben Collins <bcollins@debian\&.org>\&.