{"id":3519,"date":"2022-12-20T17:08:54","date_gmt":"2022-12-20T20:08:54","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/pam_env-man8\/"},"modified":"2022-12-20T17:08:54","modified_gmt":"2022-12-20T20:08:54","slug":"pam_env-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/pam_env-man8\/","title":{"rendered":"PAM_ENV (man8)"},"content":{"rendered":"<h1 align=\"center\">PAM_ENV<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#MODULE TYPES PROVIDED\">MODULE TYPES PROVIDED<\/a><br \/> <a href=\"#RETURN VALUES\">RETURN VALUES<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">pam_env \u2212 PAM module to set\/unset environment variables<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"89%\">\n<p style=\"margin-top: 1em\"><b>pam_env.so<\/b> [debug] [conffile=<i>conf\u2212file<\/i>] [envfile=<i>env\u2212file<\/i>] [readenv=<i>0|1<\/i>] [user_envfile=<i>env\u2212file<\/i>] [user_readenv=<i>0|1<\/i>]<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The pam_env PAM module allows the (un)setting of environment variables. Supported is the use of previously set environment variables as well as <i>PAM_ITEM<\/i>s such as <i>PAM_RHOST<\/i>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">By default rules for (un)setting of variables are taken from the config file \/etc\/security\/pam_env.conf. An alternate file can be specified with the <i>conffile<\/i> option.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Second a file (\/etc\/environment by default) with simple <i>KEY=VAL<\/i> pairs on separate lines will be read. With the <i>envfile<\/i> option an alternate file can be specified. And with the <i>readenv<\/i> option this can be completly disabled.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Third it will read a user configuration file ($HOME\/.pam_environment by default). The default file file can be changed with the <i>user_envfile<\/i> option and it can be turned on and off with the <i>user_readenv<\/i> option.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Since setting of PAM environment variables can have side effects to other modules, this module should be the last one on the stack.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>conffile=<\/b><i>\/path\/to\/pam_env.conf<\/i><\/p>\n<p style=\"margin-left:17%;\">Indicate an alternative pam_env.conf style configuration file to override the default. This can be useful when different services need different environments.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>debug<\/b><\/p>\n<p style=\"margin-left:17%;\">A lot of debug information is printed with <b>syslog<\/b>(3).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>envfile=<\/b><i>\/path\/to\/environment<\/i><\/p>\n<p style=\"margin-left:17%;\">Indicate an alternative environment file to override the default. The syntax are simple <i>KEY=VAL<\/i> pairs on separate lines. The <i>export<\/i> instruction can be specified for bash compatibility, but will be ignored. This can be useful when different services need different environments.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>readenv=<\/b><i>0|1<\/i><\/p>\n<p style=\"margin-left:17%;\">Turns on or off the reading of the file specified by envfile (0 is off, 1 is on). By default this option is on.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>user_envfile=<\/b><i>filename<\/i><\/p>\n<p style=\"margin-left:17%;\">Indicate an alternative .pam_environment file to override the default.The syntax is the same as for <i>\/etc\/environment<\/i>. The filename is relative to the user home directory. This can be useful when different services need different environments.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>user_readenv=<\/b><i>0|1<\/i><\/p>\n<p style=\"margin-left:17%;\">Turns on or off the reading of the user specific environment file. 0 is off, 1 is on. By default this option is off as user supplied environment variables in the PAM environment could affect behavior of subsequent modules in the stack without the consent of the system administrator.<\/p>\n<h2>MODULE TYPES PROVIDED <a name=\"MODULE TYPES PROVIDED\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>auth<\/b> and <b>session<\/b> module types are provided.<\/p>\n<h2>RETURN VALUES <a name=\"RETURN VALUES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">PAM_ABORT<\/p>\n<p style=\"margin-left:17%;\">Not all relevant data or options could be gotten.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">PAM_BUF_ERR<\/p>\n<p style=\"margin-left:17%;\">Memory buffer error.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">PAM_IGNORE<\/p>\n<p style=\"margin-left:17%;\">No pam_env.conf and environment file was found.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">PAM_SUCCESS<\/p>\n<p style=\"margin-left:17%;\">Environment variables were set.<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">\/etc\/security\/pam_env.conf<\/p>\n<p style=\"margin-left:17%;\">Default configuration file<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/etc\/environment<\/p>\n<p style=\"margin-left:17%;\">Default environment file<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$HOME\/.pam_environment<\/p>\n<p style=\"margin-left:17%;\">User specific environment file<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>pam_env.conf<\/b>(5), <b>pam.d<\/b>(5), <b>pam<\/b>(8), <b>environ<\/b>(7).<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">pam_env was written by Dave Kinchlea <kinch@kinch.ark.com>.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  pam_env \u2212 PAM module to set\/unset environment variables <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,641],"class_list":["post-3519","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-pam_env"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3519"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3519\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}