README 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. pam_access — PAM module for logdaemon style login access control
  2. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  3. DESCRIPTION
  4. The pam_access PAM module is mainly for access management. It provides
  5. logdaemon style login access control based on login names, host or domain
  6. names, internet addresses or network numbers, or on terminal line names, X
  7. $DISPLAY values, or PAM service names in case of non-networked logins.
  8. By default rules for access management are taken from config file /etc/security
  9. /access.conf if you don't specify another file. Then individual *.conf files
  10. from the /etc/security/access.d/ directory are read. The files are parsed one
  11. after another in the order of the system locale. The effect of the individual
  12. files is the same as if all the files were concatenated together in the order
  13. of parsing. This means that once a pattern is matched in some file no further
  14. files are parsed. If a config file is explicitly specified with the accessfile
  15. option the files in the above directory are not parsed.
  16. If Linux PAM is compiled with audit support the module will report when it
  17. denies access based on origin (host, tty, etc.).
  18. OPTIONS
  19. accessfile=/path/to/access.conf
  20. Indicate an alternative access.conf style configuration file to override
  21. the default. This can be useful when different services need different
  22. access lists.
  23. debug
  24. A lot of debug information is printed with syslog(3).
  25. noaudit
  26. Do not report logins from disallowed hosts and ttys to the audit subsystem.
  27. fieldsep=separators
  28. This option modifies the field separator character that pam_access will
  29. recognize when parsing the access configuration file. For example: fieldsep
  30. =| will cause the default `:' character to be treated as part of a field
  31. value and `|' becomes the field separator. Doing this may be useful in
  32. conjunction with a system that wants to use pam_access with X based
  33. applications, since the PAM_TTY item is likely to be of the form
  34. "hostname:0" which includes a `:' character in its value. But you should
  35. not need this.
  36. listsep=separators
  37. This option modifies the list separator character that pam_access will
  38. recognize when parsing the access configuration file. For example: listsep
  39. =, will cause the default ` ' (space) and `\t' (tab) characters to be
  40. treated as part of a list element value and `,' becomes the only list
  41. element separator. Doing this may be useful on a system with group
  42. information obtained from a Windows domain, where the default built-in
  43. groups "Domain Users", "Domain Admins" contain a space.
  44. nodefgroup
  45. User tokens which are not enclosed in parentheses will not be matched
  46. against the group database. The backwards compatible default is to try the
  47. group database match even for tokens not enclosed in parentheses.
  48. EXAMPLES
  49. These are some example lines which might be specified in /etc/security/
  50. access.conf.
  51. User root should be allowed to get access via cron, X11 terminal :0, tty1, ...,
  52. tty5, tty6.
  53. +:root:crond :0 tty1 tty2 tty3 tty4 tty5 tty6
  54. User root should be allowed to get access from hosts which own the IPv4
  55. addresses. This does not mean that the connection have to be a IPv4 one, a IPv6
  56. connection from a host with one of this IPv4 addresses does work, too.
  57. +:root:192.168.200.1 192.168.200.4 192.168.200.9
  58. +:root:127.0.0.1
  59. User root should get access from network 192.168.201. where the term will be
  60. evaluated by string matching. But it might be better to use network/netmask
  61. instead. The same meaning of 192.168.201. is 192.168.201.0/24 or 192.168.201.0/
  62. 255.255.255.0.
  63. +:root:192.168.201.
  64. User root should be able to have access from hosts foo1.bar.org and
  65. foo2.bar.org (uses string matching also).
  66. +:root:foo1.bar.org foo2.bar.org
  67. User root should be able to have access from domain foo.bar.org (uses string
  68. matching also).
  69. +:root:.foo.bar.org
  70. User root should be denied to get access from all other sources.
  71. -:root:ALL
  72. User foo and members of netgroup admins should be allowed to get access from
  73. all sources. This will only work if netgroup service is available.
  74. +:@admins foo:ALL
  75. User john and foo should get access from IPv6 host address.
  76. +:john foo:2001:db8:0:101::1
  77. User john should get access from IPv6 net/mask.
  78. +:john:2001:db8:0:101::/64
  79. Members of group wheel should be allowed to get access from all sources.
  80. +:(wheel):ALL
  81. Disallow console logins to all but the shutdown, sync and all other accounts,
  82. which are a member of the wheel group.
  83. -:ALL EXCEPT (wheel) shutdown sync:LOCAL
  84. All other users should be denied to get access from all sources.
  85. -:ALL:ALL