group.conf 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #
  2. # This is the configuration file for the pam_group module.
  3. #
  4. #
  5. # *** Please note that giving group membership on a session basis is
  6. # *** NOT inherently secure. If a user can create an executable that
  7. # *** is setgid a group that they are infrequently given membership
  8. # *** of, they can basically obtain group membership any time they
  9. # *** like. Example: games are allowed between the hours of 6pm and 6am
  10. # *** user joe logs in at 7pm writes a small C-program toplay.c that
  11. # *** invokes their favorite shell, compiles it and does
  12. # *** "chgrp play toplay; chmod g+s toplay". They are basically able
  13. # *** to play games any time... You have been warned. AGM
  14. #
  15. #
  16. # The syntax of the lines is as follows:
  17. #
  18. # services;ttys;users;times;groups
  19. #
  20. # white space is ignored and lines maybe extended with '\\n' (escaped
  21. # newlines). From reading these comments, it is clear that
  22. # text following a '#' is ignored to the end of the line.
  23. #
  24. # the combination of individual users/terminals etc is a logic list
  25. # namely individual tokens that are optionally prefixed with '!' (logical
  26. # not) and separated with '&' (logical and) and '|' (logical or).
  27. #
  28. # services
  29. # is a logic list of PAM service names that the rule applies to.
  30. #
  31. # ttys
  32. # is a logic list of terminal names that this rule applies to.
  33. #
  34. # users
  35. # is a logic list of users or a netgroup of users to whom this
  36. # rule applies.
  37. #
  38. # NB. For these items the simple wildcard '*' may be used only once.
  39. # With netgroups no wildcards or logic operators are allowed.
  40. #
  41. # times
  42. # It is used to indicate "when" these groups are to be given to the
  43. # user. The format here is a logic list of day/time-range
  44. # entries the days are specified by a sequence of two character
  45. # entries, MoTuSa for example is Monday Tuesday and Saturday. Note
  46. # that repeated days are unset MoMo = no day, and MoWk = all weekdays
  47. # bar Monday. The two character combinations accepted are
  48. #
  49. # Mo Tu We Th Fr Sa Su Wk Wd Al
  50. #
  51. # the last two being week-end days and all 7 days of the week
  52. # respectively. As a final example, AlFr means all days except Friday.
  53. #
  54. # Each day/time-range can be prefixed with a '!' to indicate "anything
  55. # but"
  56. #
  57. # The time-range part is two 24-hour times HHMM separated by a hyphen
  58. # indicating the start and finish time (if the finish time is smaller
  59. # than the start time it is deemed to apply on the following day).
  60. #
  61. # groups
  62. # The (comma or space separated) list of groups that the user
  63. # inherits membership of. These groups are added if the previous
  64. # fields are satisfied by the user's request
  65. #
  66. # For a rule to be active, ALL of service+ttys+users must be satisfied
  67. # by the applying process.
  68. #
  69. #
  70. # Note, to get this to work as it is currently typed you need
  71. #
  72. # 1. to run an application as root
  73. # 2. add the following groups to the /etc/group file:
  74. # floppy, play, sound
  75. #
  76. #
  77. # Here is a simple example: running 'xsh' on tty* (any ttyXXX device),
  78. # the user 'us' is given access to the floppy (through membership of
  79. # the floppy group)
  80. #
  81. #xsh;tty*&!ttyp*;us;Al0000-2400;floppy
  82. #
  83. # another example: running 'xsh' on tty* (any ttyXXX device),
  84. # the user 'sword' is given access to games (through membership of
  85. # the sound and play group) after work hours.
  86. #
  87. #xsh; tty* ;sword;!Wk0900-1800;sound, play
  88. #xsh; tty* ;*;Al0900-1800;floppy
  89. #
  90. # yet another example: any member of the group 'admin' running
  91. # 'xsh' on tty*, is granted access (at any time) to the group 'plugdev'
  92. #
  93. #xsh; tty* ;%admin;Al0000-2400;plugdev
  94. #
  95. # End of group.conf file
  96. #