]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
su: (man) add hint about sessions
authorKarel Zak <kzak@redhat.com>
Thu, 1 Feb 2024 10:53:37 +0000 (11:53 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 1 Feb 2024 10:53:37 +0000 (11:53 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/su.1.adoc

index 76c54aa00fc15e82bca828bbda3223fe0da00b43..8ae6b6ca6ece10f5ce3c696f55de43ae267cde5d 100644 (file)
@@ -46,8 +46,15 @@ Specify the primary group. This option is available to the root user only.
 Specify a supplementary group. This option is available to the root user only. The first specified supplementary group is also used as a primary group if the option *--group* is not specified.
 
 *-*, *-l*, *--login*::
-Start the shell as a login shell with an environment similar to a real login:
-
+Start the shell as a login shell with an environment similar to a real login.
++
+Note that on systemd-based systems, a new session may be defined as a real
+entry point to the system. However, *su* does not create a real session (by
+PAM) from this point of view. You need to use tools like *systemd-run* or
+*machinectl* to initiate a complete, real session.
++
+*su* does:
++
 * clears all the environment variables except *TERM* and variables specified by *--whitelist-environment*
 * initializes the environment variables *HOME*, *SHELL*, *USER*, *LOGNAME*, and *PATH*
 * changes to the target user's home directory