README 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. pam_env — PAM module to set/unset environment variables
  2. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  3. DESCRIPTION
  4. The pam_env PAM module allows the (un)setting of environment variables.
  5. Supported is the use of previously set environment variables as well as
  6. PAM_ITEMs such as PAM_RHOST.
  7. By default rules for (un)setting of variables are taken from the config file /
  8. etc/security/pam_env.conf. An alternate file can be specified with the conffile
  9. option.
  10. Second a file (/etc/environment by default) with simple KEY=VAL pairs on
  11. separate lines will be read. With the envfile option an alternate file can be
  12. specified. And with the readenv option this can be completely disabled.
  13. Third it will read a user configuration file ($HOME/.pam_environment by
  14. default). The default file can be changed with the user_envfile option and it
  15. can be turned on and off with the user_readenv option.
  16. Since setting of PAM environment variables can have side effects to other
  17. modules, this module should be the last one on the stack.
  18. OPTIONS
  19. conffile=/path/to/pam_env.conf
  20. Indicate an alternative pam_env.conf style configuration file to override
  21. the default. This can be useful when different services need different
  22. environments.
  23. debug
  24. A lot of debug information is printed with syslog(3).
  25. envfile=/path/to/environment
  26. Indicate an alternative environment file to override the default. The
  27. syntax are simple KEY=VAL pairs on separate lines. The export instruction
  28. can be specified for bash compatibility, but will be ignored. This can be
  29. useful when different services need different environments.
  30. readenv=0|1
  31. Turns on or off the reading of the file specified by envfile (0 is off, 1
  32. is on). By default this option is on.
  33. user_envfile=filename
  34. Indicate an alternative .pam_environment file to override the default.The
  35. syntax is the same as for /etc/security/pam_env.conf. The filename is
  36. relative to the user home directory. This can be useful when different
  37. services need different environments.
  38. user_readenv=0|1
  39. Turns on or off the reading of the user specific environment file. 0 is
  40. off, 1 is on. By default this option is off as user supplied environment
  41. variables in the PAM environment could affect behavior of subsequent
  42. modules in the stack without the consent of the system administrator.
  43. Due to problematic security this functionality is deprecated since the
  44. 1.5.0 version and will be removed completely at some point in the future.
  45. EXAMPLES
  46. These are some example lines which might be specified in /etc/security/
  47. pam_env.conf.
  48. Set the REMOTEHOST variable for any hosts that are remote, default to
  49. "localhost" rather than not being set at all
  50. REMOTEHOST DEFAULT=localhost OVERRIDE=@{PAM_RHOST}
  51. Set the DISPLAY variable if it seems reasonable
  52. DISPLAY DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY}
  53. Now some simple variables
  54. PAGER DEFAULT=less
  55. MANPAGER DEFAULT=less
  56. LESS DEFAULT="M q e h15 z23 b80"
  57. NNTPSERVER DEFAULT=localhost
  58. PATH DEFAULT=${HOME}/bin:/usr/local/bin:/bin\
  59. :/usr/bin:/usr/local/bin/X11:/usr/bin/X11
  60. XDG_DATA_HOME DEFAULT=@{HOME}/share/
  61. Silly examples of escaped variables, just to show how they work.
  62. DOLLAR DEFAULT=\$
  63. DOLLARDOLLAR DEFAULT= OVERRIDE=\$${DOLLAR}
  64. DOLLARPLUS DEFAULT=\${REMOTEHOST}${REMOTEHOST}
  65. ATSIGN DEFAULT="" OVERRIDE=\@