pam_exec8
Exec pam module
Usage
[service-name] module-type control-flag pam_exec [arguments]
Overview
The exec service module for PAM executes the program designated by its first argument if no options are specified, with its remaining arguments as command-line arguments. If options are specified, the program and its arguments follow the last option or -- if the program name conflicts with an option name.
The following options may be passed before the program and its arguments:
capture_stderr-
Capture text printed by the program to its standard error stream and pass it to the conversation function as error messages. No attempt is made at buffering the text, so results may vary.
capture_stdout-
Capture text printed by the program to its standard output stream and pass it to the conversation function as informational messages. No attempt is made at buffering the text, so results may vary.
debug-
Ignored for compatibility reasons.
no_warn-
Ignored for compatibility reasons.
return_prog_exit_status-
Use the program exit status as the return code of the pam_sm_* function. It must be a valid return value for this function.
expose_authtok-
Write the authentication token to the program's standard input stream, followed by a NUL character. Ignored for
pam_sm_setcred(). use_first_pass-
If
expose_authtokwas specified, do not prompt for an authentication token if one is not already available. -
-- -
Stop options parsing; program and its arguments follow.
The child's environment is set to the current PAM environment list, as returned by pam_getenvlist(3). In addition, the following PAM items are exported as environment variables: PAM_RHOST, PAM_RUSER, PAM_SERVICE, PAM_SM_FUNC, PAM_TTY and PAM_USER.
The PAM_SM_FUNC variable contains the name of the PAM service module function being called. It may be:
-
pam_sm_acct_mgmt
-
pam_sm_authenticate
-
pam_sm_chauthtok
-
pam_sm_close_session
-
pam_sm_open_session
-
pam_sm_setcred
If return_prog_exit_status is not set (default), the PAM_SM_FUNC function returns PAM_SUCCESS if the program exit status is 0, PAM_PERM_DENIED otherwise.
If return_prog_exit_status is set, the program exit status is used. It should be PAM_SUCCESS or one of the error codes allowed by the calling PAM_SM_FUNC function. The valid codes are documented in each function man page. If the exit status is not a valid return code, PAM_SERVICE_ERR is returned. Each valid codes numerical value is available as an environment variable (eg. PAM_SUCESS, PAM_USER_UNKNOWN, etc). This is useful in shell scripts for instance.
Releases
56 releases since FreeBSD 5.0-RELEASE; the text changed 37 times.
- 5.0
- 5.1–5.2.1
- 5.3–5.5
- 6.0–6.3
- 6.4
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3
- 8.4
- 9.0
- 9.1
- 9.2
- 9.3
- 10.0
- 10.1
- 10.2
- 10.3
- 10.4
- 11.0
- 11.1
- 11.2
- 11.3
- 11.4
- 12.0
- 12.1
- 12.2
- 12.3
- 12.4
- 13.0–13.2
- 13.3–13.5
- 14.0–14.2
- 14.3–16.0
-- since FreeBSD 9.1-RELEASE.