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). Only first PAM_MAX_RESP_SIZE bytes of a password are
28           provided to the command.
29
30       log=file
31           The output of the command is appended to file
32
33       quiet
34           Per default pam_exec.so will echo the exit status of the external
35           command if it fails. Specifying this option will suppress the
36           message.
37
38       seteuid
39           Per default pam_exec.so will execute the external command with the
40           real user ID of the calling process. Specifying this option means
41           the command is run with the effective user ID.
42

MODULE TYPES PROVIDED

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

RETURN VALUES

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

EXAMPLES

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

SEE ALSO

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

AUTHOR

77       pam_exec was written by Thorsten Kukuk <kukuk@thkukuk.de>.
78
79
80
81Linux-PAM Manual                  03/22/2017                       PAM_EXEC(8)
Impressum