group.conf.5.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <?xml version="1.0" encoding='UTF-8'?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
  4. <refentry id="group.conf">
  5. <refmeta>
  6. <refentrytitle>group.conf</refentrytitle>
  7. <manvolnum>5</manvolnum>
  8. <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
  9. </refmeta>
  10. <refnamediv>
  11. <refname>group.conf</refname>
  12. <refpurpose>configuration file for the pam_group module</refpurpose>
  13. </refnamediv>
  14. <refsect1 id='group.conf-description'>
  15. <title>DESCRIPTION</title>
  16. <para>
  17. The pam_group PAM module does not authenticate the user, but instead
  18. it grants group memberships (in the credential setting phase of the
  19. authentication module) to the user. Such memberships are based on the
  20. service they are applying for.
  21. </para>
  22. <para>
  23. For this module to function correctly there must be a correctly
  24. formatted <filename>/etc/security/group.conf</filename> file present.
  25. White spaces are ignored and lines maybe extended with '\' (escaped
  26. newlines). Text following a '#' is ignored to the end of the line.
  27. </para>
  28. <para>
  29. The syntax of the lines is as follows:
  30. </para>
  31. <para>
  32. <replaceable>services</replaceable>;<replaceable>ttys</replaceable>;<replaceable>users</replaceable>;<replaceable>times</replaceable>;<replaceable>groups</replaceable>
  33. </para>
  34. <para>
  35. The first field, the <replaceable>services</replaceable> field, is a logic list
  36. of PAM service names that the rule applies to.
  37. </para>
  38. <para>
  39. The second field, the <replaceable>tty</replaceable>
  40. field, is a logic list of terminal names that this rule applies to.
  41. </para>
  42. <para>
  43. The third field, the <replaceable>users</replaceable>
  44. field, is a logic list of users, or a UNIX group, or a netgroup of
  45. users to whom this rule applies. Group names are preceded by a '%'
  46. symbol, while netgroup names are preceded by a '@' symbol.
  47. </para>
  48. <para>
  49. A logic list namely means individual tokens that are optionally prefixed
  50. with '!' (logical not) and separated with '&amp;' (logical and) and '|'
  51. (logical or).
  52. </para>
  53. <para>
  54. For these items the simple wildcard '*' may be used only once.
  55. With UNIX groups or netgroups no wildcards or logic operators
  56. are allowed.
  57. </para>
  58. <para>
  59. The <replaceable>times</replaceable> field is used to indicate "when"
  60. these groups are to be given to the user. The format here is a logic
  61. list of day/time-range entries. The days are specified by a sequence of
  62. two character entries, MoTuSa for example is Monday Tuesday and Saturday.
  63. Note that repeated days are unset MoMo = no day, and MoWk = all weekdays
  64. bar Monday. The two character combinations accepted are Mo Tu We Th Fr Sa
  65. Su Wk Wd Al, the last two being week-end days and all 7 days of the week
  66. respectively. As a final example, AlFr means all days except Friday.
  67. </para>
  68. <para>
  69. Each day/time-range can be prefixed with a '!' to indicate "anything but".
  70. The time-range part is two 24-hour times HHMM, separated by a hyphen,
  71. indicating the start and finish time (if the finish time is smaller
  72. than the start time it is deemed to apply on the following day).
  73. </para>
  74. <para>
  75. The <replaceable>groups</replaceable> field is a comma or space
  76. separated list of groups that the user inherits membership of. These
  77. groups are added if the previous fields are satisfied by the user's request.
  78. </para>
  79. <para>
  80. For a rule to be active, ALL of service+ttys+users must be satisfied
  81. by the applying process.
  82. </para>
  83. </refsect1>
  84. <refsect1 id="group.conf-examples">
  85. <title>EXAMPLES</title>
  86. <para>
  87. These are some example lines which might be specified in
  88. <filename>/etc/security/group.conf</filename>.
  89. </para>
  90. <para>
  91. Running 'xsh' on tty* (any ttyXXX device), the user 'us' is given access
  92. to the floppy (through membership of the floppy group)
  93. </para>
  94. <programlisting>xsh;tty*&amp;!ttyp*;us;Al0000-2400;floppy</programlisting>
  95. <para>
  96. Running 'xsh' on tty* (any ttyXXX device), the users 'sword', 'pike' and
  97. 'shield' are given access to games (through membership of the floppy group) after work hours.
  98. </para>
  99. <programlisting>
  100. xsh; tty* ;sword|pike|shield;!Wk0900-1800;games, sound
  101. xsh; tty* ;*;Al0900-1800;floppy
  102. </programlisting>
  103. <para>
  104. Any member of the group 'admin' running 'xsh' on tty*,
  105. is granted access (at any time) to the group 'plugdev'
  106. </para>
  107. <programlisting>
  108. xsh; tty* ;%admin;Al0000-2400;plugdev
  109. </programlisting>
  110. </refsect1>
  111. <refsect1 id="group.conf-see_also">
  112. <title>SEE ALSO</title>
  113. <para>
  114. <citerefentry><refentrytitle>pam_group</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
  115. <citerefentry><refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
  116. <citerefentry><refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum></citerefentry>
  117. </para>
  118. </refsect1>
  119. <refsect1 id="group.conf-author">
  120. <title>AUTHOR</title>
  121. <para>
  122. pam_group was written by Andrew G. Morgan &lt;morgan@kernel.org&gt;.
  123. </para>
  124. </refsect1>
  125. </refentry>