logo

cross-unix-documentation

documentation of similarities and (noteworthy) differencies between Unix systems
commit: ab89fd4240597197e7ee0c7933b5977f94972451
parent: 2a3fc9f6b61bbfd1ce6a26ef494c3a9391e35d55
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed,  6 Mar 2019 06:30:24 +0100

man1x/su.1x: use .Ev on environment variables

Diffstat:

Mman1x/su.1x27++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/man1x/su.1x b/man1x/su.1x @@ -22,20 +22,34 @@ which is an attempt to provide documentation of similarities and (noteworthy) di The .Nm utility is used to run a command or get a shell as another user, without having to log out. -By default the environment is unmodified with the exception of LOGNAME, HOME, SHELL, and USER. -HOME and SHELL are set to the target user’s default values. LOGNAME and USER are set to the target user, unless the target user has a UID of 0 and +By default the environment is unmodified with the exception of +.Ev LOGNAME , +.Ev HOME , +.Ev SHELL +and +.Ev USER . +.Ev HOME and +.Ev SHELL are set to the target user’s default values. +.Ev LOGNAME +and +.Ev USER +are set to the target user, unless the target user has a UID of 0 and .Fl l was not specified, in which case it is unmodified. The invoked shell is the target user’s. This is the traditional behaviour of su. If not using .Fl m -and the target login has a UID of 0 then the PATH variable and umask are set to implementation defined behaviour. +and the target login has a UID of 0 then the +.Ev PATH +variable and umask are set to implementation defined behaviour. .Pp If .Op username was not set it defaults to UID 0 (also known as Super-User). .Bl -tag -width Ds .It - , Fl l -Simulate a full login, this discards the origin user’s environment, expect for few implementation defined ones (like TERM). Absent in BusyBox. +Simulate a full login, this discards the origin user’s environment, expect for few implementation defined ones (like +.Ev TERM +). Absent in BusyBox. .It Fl c Ar command Executes .Ar command @@ -46,7 +60,10 @@ as the target user. This flag is used for "login class" in where you must pass the command by appending it to the end, along with the target user’s username. .It Fl p , Fl m Preserve the environment, few exceptions are present between implementations. -GNU: preserve expect for PATH and IFS +GNU: preserve expect for +.Ev PATH +and +.Ev IFS .It Fl s Ar shell Login to target user with .Ar shell