PAM_ENV(7)
๐ PAM_ENV ๐
okay bestie, welcome to PAM_ENV(7) โ the Linux-PAM Manual page for pam_env, and yes this is a real manual page, we're just doing it with โจflavorโจ now.
๐ NAME ๐
pam_env โ the PAM module that sets and unsets environment variables. That's it. That's the whole job. She does one thing and she slays at it. ๐
โจ SYNOPSIS โจ
pam_env.so [debug] [conffile=conf-file] [envfile=env-file] [readenv=0|1]
[user_envfile=env-file] [user_readenv=0|1]
๐ธ DESCRIPTION ๐ธ
so the pam_env PAM module lets you (un)set environment variables. and like, it's not just vibes โ it supports using environment variables that were already set, plus PAM_ITEMs such as PAM_RHOST. she's connected. she knows things. ๐ฅ
by default, the rules for (un)setting variables come from the config file /etc/security/pam_env.conf. want a different one? use the conffile option. easy. ๐ซถ
secondly, a file (/etc/environment by default) gets read โ just simple KEY=VAL pairs, one per line, no drama. you can point her at an alternate file with the envfile option, and with the readenv option you can turn this whole thing off completely. ๐ซ
third, she'll read a user configuration file ($HOME/.pam_environment by default). change the default file with the user_envfile option, and flip it on or off with user_readenv. โจ
ngl bestie, setting PAM environment variables can have side effects on other modules, so this module should be the last one on the stack. periodt. no negotiating. ๐ญ
๐ OPTIONS ๐
conffile=/path/to/pam_env.confโ points to an alternativepam_env.conf-style configuration file to override the default. lowkey iconic when different services need different environments. ๐debugโ prints a lot of debug information withsyslog(3). a lot a lot. she's chatty. ๐envfile=/path/to/environmentโ points to an alternative environment file to override the default. the syntax is simpleKEY=VALpairs on separate lines. theexportinstruction can be specified for bash compatibility, but it will be ignored (not her problem, don't ask). also useful when different services need different environments. โจreadenv=0|1โ turns on or off the reading of the file specified byenvfile(0is off,1is on). by default this option is on. ๐user_envfile=filenameโ points to an alternative.pam_environmentfile to override the default. the syntax is the same as for/etc/security/pam_env.conf. the filename is relative to the user home directory. useful when different services need different environments. ๐ฆuser_readenv=0|1โ turns on or off the reading of the user specific environment file.0is off,1is on. by default this option is off, because user supplied environment variables in the PAM environment could affect the behavior of subsequent modules in the stack without the consent of the system administrator. ๐ค
๐จ and here's the big one: due to problematic security, this functionality is deprecated since the 1.5.0 version and will be removed completely at some point in the future. do not build your whole personality around it, bestie. ๐
โญ MODULE TYPES PROVIDED โญ
the auth and session module types are provided. two of them. matching set. ๐
๐ง RETURN VALUES ๐ง
PAM_ABORTโ not all relevant data or options could be gotten. she couldn't get what she needed. relatable. ๐ญPAM_BUF_ERRโ memory buffer error. ๐PAM_IGNOREโ nopam_env.confand environment file was found. nowhere to look, nothing to do. ๐PAM_SUCCESSโ environment variables were set. slay!! ๐ฅ๐
๐ FILES ๐
/etc/security/pam_env.confโ the default configuration file/etc/environmentโ the default environment file$HOME/.pam_environmentโ the user specific environment file
๐ SEE ALSO ๐
pam_env.conf(5), pam.d(5), pam(8), environ(7).
go read those too, iykyk. ๐โจ
๐ AUTHOR ๐
pam_env was written by Dave Kinchlea <kinch@kinch.ark.com>. legend behavior, honestly. ๐ซถ
and that's the whole page bestie!! ๐ this was the Linux-PAM Manual version, dated 09/03/2021, page PAM_ENV(7) โ so if you're reading this from the future and something's different, that's a you-and-your-distro problem, not mine. mwah, go set some environment variables, love u, bye!! ๐โจ๐ฆ
๐ฆ where this page comes from
- debian bookworm: libpam-modules 1.5.2-6+deb12u2 ยท BSD-3-Clause OR GPL
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms