is enabled in _\bs_\bu_\bd_\bo_\be_\br_\bs and _\bH_\bO_\bM_\bE is not present in the
_\be_\bn_\bv_\b__\bk_\be_\be_\bp list.
+ LOGNAME Set to the login name of the target user when the -\b-i\bi
+ option is specified, when the _\bs_\be_\bt_\b__\bl_\bo_\bg_\bn_\ba_\bm_\be option is
+ enabled in _\bs_\bu_\bd_\bo_\be_\br_\bs or when the _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt option is
+ enabled in _\bs_\bu_\bd_\bo_\be_\br_\bs (unless LOGNAME is present in the
+ _\be_\bn_\bv_\b__\bk_\be_\be_\bp list).
+
PATH May be overridden by the security policy.
SHELL Used to determine shell to run with -\b-s\bs option.
SUDO_USER Set to the login name of the user who invoked sudo.
- USER Set to the target user (root unless the -\b-u\bu option is
- specified).
+ USER Set to the same value as LOGNAME, described above.
+
+ USERNAME Same as USER.
VISUAL Default editor to use in -\b-e\be (sudoedit) mode if
SUDO_EDITOR is not set.
\fIenv_keep\fR
list.
.TP 17n
+\fRLOGNAME\fR
+Set to the login name of the target user when the
+\fB\-i\fR
+option is specified, when the
+\fIset_logname\fR
+option is enabled in
+\fIsudoers\fR
+or when the
+\fIenv_reset\fR
+option is enabled in
+\fIsudoers\fR
+(unless
+\fRLOGNAME\fR
+is present in the
+\fIenv_keep\fR
+list).
+.TP 17n
\fRPATH\fR
May be overridden by the security policy.
.TP 17n
Set to the login name of the user who invoked sudo.
.TP 17n
\fRUSER\fR
-Set to the target user (root unless the
-\fB\-u\fR
-option is specified).
+Set to the same value as
+\fRLOGNAME\fR,
+described above.
+.TP 17n
+\fRUSERNAME\fR
+Same as
+\fRUSER\fR.
.TP 17n
\fRVISUAL\fR
Default editor to use in
is not present in the
.Em env_keep
list.
+.It Ev LOGNAME
+Set to the login name of the target user when the
+.Fl i
+option is specified, when the
+.Em set_logname
+option is enabled in
+.Em sudoers
+or when the
+.Em env_reset
+option is enabled in
+.Em sudoers
+(unless
+.Ev LOGNAME
+is present in the
+.Em env_keep
+list).
.It Ev PATH
May be overridden by the security policy.
.It Ev SHELL
.It Ev SUDO_USER
Set to the login name of the user who invoked sudo.
.It Ev USER
-Set to the target user (root unless the
-.Fl u
-option is specified).
+Set to the same value as
+.Ev LOGNAME ,
+described above.
+.It Ev USERNAME
+Same as
+.Ev USER .
.It Ev VISUAL
Default editor to use in
.Fl e