group.conf.5 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. '\" t
  2. .\" Title: group.conf
  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 "GROUP\&.CONF" "5" "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. 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. .fi
  97. .if n \{\
  98. .RE
  99. .\}
  100. .PP
  101. Any member of the group \*(Aqadmin\*(Aq running \*(Aqxsh\*(Aq on tty*, is granted access (at any time) to the group \*(Aqplugdev\*(Aq
  102. .sp
  103. .if n \{\
  104. .RS 4
  105. .\}
  106. .nf
  107. xsh; tty* ;%admin;Al0000\-2400;plugdev
  108. .fi
  109. .if n \{\
  110. .RE
  111. .\}
  112. .SH "SEE ALSO"
  113. .PP
  114. \fBpam_group\fR(8),
  115. \fBpam.d\fR(5),
  116. \fBpam\fR(8)
  117. .SH "AUTHOR"
  118. .PP
  119. pam_group was written by Andrew G\&. Morgan <morgan@kernel\&.org>\&.