README 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. pam_exec — PAM module which calls an external command
  2. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  3. DESCRIPTION
  4. pam_exec is a PAM module that can be used to run an external command.
  5. The child's environment is set to the current PAM environment list, as returned
  6. by pam_getenvlist(3) In addition, the following PAM items are exported as
  7. environment variables: PAM_RHOST, PAM_RUSER, PAM_SERVICE, PAM_TTY, PAM_USER and
  8. PAM_TYPE, which contains one of the module types: account, auth, password,
  9. open_session and close_session.
  10. Commands called by pam_exec need to be aware of that the user can have control
  11. over the environment.
  12. OPTIONS
  13. debug
  14. Print debug information.
  15. expose_authtok
  16. During authentication the calling command can read the password from stdin
  17. (3). Only first PAM_MAX_RESP_SIZE bytes of a password are provided to the
  18. command.
  19. log=file
  20. The output of the command is appended to file
  21. type=type
  22. Only run the command if the module type matches the given type.
  23. stdout
  24. Per default the output of the executed command is written to /dev/null.
  25. With this option, the stdout output of the executed command is redirected
  26. to the calling application. It's in the responsibility of this application
  27. what happens with the output. The log option is ignored.
  28. quiet
  29. Per default pam_exec.so will echo the exit status of the external command
  30. if it fails. Specifying this option will suppress the message.
  31. quiet_log
  32. Per default pam_exec.so will log the exit status of the external command if
  33. it fails. Specifying this option will suppress the log message.
  34. seteuid
  35. Per default pam_exec.so will execute the external command with the real
  36. user ID of the calling process. Specifying this option means the command is
  37. run with the effective user ID.
  38. EXAMPLES
  39. Add the following line to /etc/pam.d/passwd to rebuild the NIS database after
  40. each local password change:
  41. password optional pam_exec.so seteuid /usr/bin/make -C /var/yp
  42. This will execute the command
  43. make -C /var/yp
  44. with effective user ID.
  45. AUTHOR
  46. pam_exec was written by Thorsten Kukuk <kukuk@thkukuk.de> and Josh Triplett
  47. <josh@joshtriplett.org>.