diff options
author | Karel Zak <kzak@redhat.com> | 2020-02-27 14:37:23 +0100 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2020-05-15 11:50:35 +0200 |
commit | 3ed97beca6fae91ae2bfa424733fe6bf9c3b9abe (patch) | |
tree | f7d742530358ec23f4c18e8e2b6856a8140da4ce | |
parent | a7399fa3c214b8a031e431b4737da855f98b1a2d (diff) | |
download | util-linux-3ed97beca6fae91ae2bfa424733fe6bf9c3b9abe.tar.gz |
su, runuser: (man) add more info about PATH and PAM
Addresses: https://github.com/karelzak/util-linux/issues/964
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | login-utils/runuser.1 | 8 | ||||
-rw-r--r-- | login-utils/su.1 | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/login-utils/runuser.1 b/login-utils/runuser.1 index 27dbf576c..17bab28d8 100644 --- a/login-utils/runuser.1 +++ b/login-utils/runuser.1 @@ -52,6 +52,11 @@ is not root). This version of .B runuser uses PAM for session management. +.PP +Note that +.B runuser +in all cases use PAM (pam_getenvlist()) to do final environment modification. The command line options +like \fB\-\-login\fR or \fB\-\-preserve\-environment\fR affect environment before it's modified by PAM. .SH OPTIONS .TP .BR \-c , " \-\-command" = \fIcommand @@ -212,7 +217,8 @@ initializes .RE .sp The environment variable PATH may be different on systems where /bin and /sbin -are merged into /usr. +are merged into /usr, this variable is also affected by \fB\-\-login\fR command line option and +PAM system setting (e.g. pam_env). .SH EXIT STATUS .B runuser normally returns the exit status of the command it executed. If the diff --git a/login-utils/su.1 b/login-utils/su.1 index 8c67dc402..6d41b0f94 100644 --- a/login-utils/su.1 +++ b/login-utils/su.1 @@ -56,6 +56,11 @@ that does not require authentication and provide separate PAM configuration. If the PAM session is not required at all then the recommend solution is to use command .BR setpriv (1). +.PP +Note that +.B su +in all cases use PAM (pam_getenvlist()) to do final environment modification. The command line options +like \fB\-\-login\fR or \fB\-\-preserve\-environment\fR affect environment before it's modified by PAM. .SH OPTIONS .TP @@ -233,7 +238,8 @@ initializes .RE .sp The environment variable PATH may be different on systems where /bin and /sbin -are merged into /usr. +are merged into /usr, this variable is also affected by \fB\-\-login\fR command line option and +PAM system setting (e.g. pam_env). .SH EXIT STATUS .B su normally returns the exit status of the command it executed. If the |