202-450 practice question 2 of 25

Which of the following PAM modules sets and unsets environment variables?

Full set: 119 questions
Answer options
A: pam_set
B: pam_shell
C: pam-vars
D: pam-env Correct answer
E: pam_export
Correct Answer:
D. pam-env
Explanation

The pamenv module is the Pluggable Authentication Module specifically designed to manage the session environment. It can set, unset, or modify environment variables for a user upon authentication. It typically reads configuration from files like /etc/environment and user-specific .pamenvironment files to establish the user's environment variables.

Why Incorrect

A. pamset is not a standard PAM module. The functionality of setting variables is handled by pamenv.
B. pamshell is a PAM module used to check if the user's login shell is valid (listed in /etc/shells), not for managing environment variables.
C. pam-vars is not a standard PAM module name. The correct module is pamenv.
E. pamexport is not a standard PAM module. The concept of exporting variables to the environment is handled by pamenv.

References

- The Linux-PAM System Administrators' Guide, Chapter 5: "The individual service modules". The section on pamenv describes its function as setting/unsetting environment variables.

- pamenv(8) Linux man page. The description states, "The pamenv PAM module is used to set/unset environment variables from a configuration file."

- Red Hat Enterprise Linux 8 Security hardening, Section 2.8.1: "The Pluggable Authentication Modules (PAM)". It describes the role of various modules, including pamenv for environment setup.

Scroll to Top