1PAM_EXEC(8)                    Linux-PAM Manual                    PAM_EXEC(8)
2
3
4

NAME

6       pam_exec - PAM module which calls an external command
7

SYNOPSIS

9       pam_exec.so [debug] [expose_authtok] [seteuid] [quiet] [log=file]
10                   command [...]
11

DESCRIPTION

13       pam_exec is a PAM module that can be used to run an external command.
14
15       The childĀ“s environment is set to the current PAM environment list, as
16       returned by pam_getenvlist(3) In addition, the following PAM items are
17       exported as environment variables: PAM_RHOST, PAM_RUSER, PAM_SERVICE,
18       PAM_TTY, PAM_USER and PAM_TYPE, which contains one of the module types:
19       account, auth, password, open_session and close_session.
20

OPTIONS

22       debug
23           Print debug information.
24
25       expose_authtok
26           During authentication the calling command can read the password
27           from stdin(3).
28
29       log=file
30           The output of the command is appended to file
31
32       quiet
33           Per default pam_exec.so will echo the exit status of the external
34           command if it fails. Specifying this option will suppress the
35           message.
36
37       seteuid
38           Per default pam_exec.so will execute the external command with the
39           real user ID of the calling process. Specifying this option means
40           the command is run with the effective user ID.
41

MODULE TYPES PROVIDED

43       All module types (auth, account, password and session) are provided.
44

RETURN VALUES

46       PAM_SUCCESS
47           The external command was run successfully.
48
49       PAM_SERVICE_ERR
50           No argument or a wrong number of arguments were given.
51
52       PAM_SYSTEM_ERR
53           A system error occurred or the command to execute failed.
54
55       PAM_IGNORE
56
57           pam_setcred was called, which does not execute the command.
58

EXAMPLES

60       Add the following line to /etc/pam.d/passwd to rebuild the NIS database
61       after each local password change:
62
63                   passwd optional pam_exec.so seteuid make -C /var/yp
64
65
66       This will execute the command
67
68           make -C /var/yp
69
70       with effective user ID.
71

SEE ALSO

73       pam.conf(5), pam.d(5), pam(8)
74

AUTHOR

76       pam_exec was written by Thorsten Kukuk <kukuk@thkukuk.de>.
77
78
79
80Linux-PAM Manual                  06/16/2009                       PAM_EXEC(8)
Impressum