| 1 |
'\" t |
| 2 |
.\" Title: group.conf |
| 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 "GROUP\&.CONF" "5" "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 |
group.conf \- configuration file for the pam_group module |
| 32 |
.SH "DESCRIPTION" |
| 33 |
.PP |
| 34 |
The pam_group PAM module does not authenticate the user, but instead it grants group memberships (in the credential setting phase of the authentication module) to the user\&. Such memberships are based on the service they are applying for\&. |
| 35 |
.PP |
| 36 |
For this module to function correctly there must be a correctly formatted |
| 37 |
/etc/security/group\&.conf |
| 38 |
file present\&. White spaces are ignored and lines maybe extended with \*(Aq\e\*(Aq (escaped newlines)\&. Text following a \*(Aq#\*(Aq is ignored to the end of the line\&. |
| 39 |
.PP |
| 40 |
The syntax of the lines is as follows: |
| 41 |
.PP |
| 42 |
\fIservices\fR;\fIttys\fR;\fIusers\fR;\fItimes\fR;\fIgroups\fR |
| 43 |
.PP |
| 44 |
The first field, the |
| 45 |
\fIservices\fR |
| 46 |
field, is a logic list of PAM service names that the rule applies to\&. |
| 47 |
.PP |
| 48 |
The second field, the |
| 49 |
\fItty\fR |
| 50 |
field, is a logic list of terminal names that this rule applies to\&. |
| 51 |
.PP |
| 52 |
The third field, the |
| 53 |
\fIusers\fR |
| 54 |
field, is a logic list of users, or a UNIX group, or a netgroup of users to whom this rule applies\&. Group names are preceded by a \*(Aq%\*(Aq symbol, while netgroup names are preceded by a \*(Aq@\*(Aq symbol\&. |
| 55 |
.PP |
| 56 |
A logic list namely means individual tokens that are optionally prefixed with \*(Aq!\*(Aq (logical not) and separated with \*(Aq&\*(Aq (logical and) and \*(Aq|\*(Aq (logical or)\&. |
| 57 |
.PP |
| 58 |
For these items the simple wildcard \*(Aq*\*(Aq may be used only once\&. With UNIX groups or netgroups no wildcards or logic operators are allowed\&. |
| 59 |
.PP |
| 60 |
The |
| 61 |
\fItimes\fR |
| 62 |
field is used to indicate "when" these groups are to be given to the user\&. The format here is a logic list of day/time\-range entries\&. The days are specified by a sequence of two character entries, MoTuSa for example is Monday Tuesday and Saturday\&. Note that repeated days are unset MoMo = no day, and MoWk = all weekdays bar Monday\&. The two character combinations accepted are Mo Tu We Th Fr Sa Su Wk Wd Al, the last two being week\-end days and all 7 days of the week respectively\&. As a final example, AlFr means all days except Friday\&. |
| 63 |
.PP |
| 64 |
Each day/time\-range can be prefixed with a \*(Aq!\*(Aq to indicate "anything but"\&. The time\-range part is two 24\-hour times HHMM, separated by a hyphen, indicating the start and finish time (if the finish time is smaller than the start time it is deemed to apply on the following day)\&. |
| 65 |
.PP |
| 66 |
The |
| 67 |
\fIgroups\fR |
| 68 |
field is a comma or space separated list of groups that the user inherits membership of\&. These groups are added if the previous fields are satisfied by the user\*(Aqs request\&. |
| 69 |
.PP |
| 70 |
For a rule to be active, ALL of service+ttys+users must be satisfied by the applying process\&. |
| 71 |
.SH "EXAMPLES" |
| 72 |
.PP |
| 73 |
These are some example lines which might be specified in |
| 74 |
/etc/security/group\&.conf\&. |
| 75 |
.PP |
| 76 |
Running \*(Aqxsh\*(Aq on tty* (any ttyXXX device), the user \*(Aqus\*(Aq is given access to the floppy (through membership of the floppy group) |
| 77 |
.sp |
| 78 |
.if n \{\ |
| 79 |
.RS 4 |
| 80 |
.\} |
| 81 |
.nf |
| 82 |
xsh;tty*&!ttyp*;us;Al0000\-2400;floppy |
| 83 |
.fi |
| 84 |
.if n \{\ |
| 85 |
.RE |
| 86 |
.\} |
| 87 |
.PP |
| 88 |
Running \*(Aqxsh\*(Aq on tty* (any ttyXXX device), the users \*(Aqsword\*(Aq, \*(Aqpike\*(Aq and \*(Aqshield\*(Aq are given access to games (through membership of the floppy group) after work hours\&. |
| 89 |
.sp |
| 90 |
.if n \{\ |
| 91 |
.RS 4 |
| 92 |
.\} |
| 93 |
.nf |
| 94 |
xsh; tty* ;sword|pike|shield;!Wk0900\-1800;games, sound |
| 95 |
xsh; tty* ;*;Al0900\-1800;floppy |
| 96 |
|
| 97 |
.fi |
| 98 |
.if n \{\ |
| 99 |
.RE |
| 100 |
.\} |
| 101 |
.PP |
| 102 |
Any member of the group \*(Aqadmin\*(Aq running \*(Aqxsh\*(Aq on tty*, is granted access (at any time) to the group \*(Aqplugdev\*(Aq |
| 103 |
.sp |
| 104 |
.if n \{\ |
| 105 |
.RS 4 |
| 106 |
.\} |
| 107 |
.nf |
| 108 |
xsh; tty* ;%admin;Al0000\-2400;plugdev |
| 109 |
|
| 110 |
.fi |
| 111 |
.if n \{\ |
| 112 |
.RE |
| 113 |
.\} |
| 114 |
.SH "SEE ALSO" |
| 115 |
.PP |
| 116 |
\fBpam_group\fR(8), |
| 117 |
\fBpam.d\fR(5), |
| 118 |
\fBpam\fR(7) |
| 119 |
.SH "AUTHOR" |
| 120 |
.PP |
| 121 |
pam_group was written by Andrew G\&. Morgan <morgan@kernel\&.org>\&. |