[sudo-workers] man page description of always_set_home
Todd C. Miller
Todd.Miller at sudo.ws
Wed Oct 16 13:10:37 MDT 2019
On Wed, 16 Oct 2019 20:14:57 +0200, =?UTF-8?B?RGFsaWJvciBQb3Nww63FoWls?= wrote:
> I had really hard time to fully understand the description of
> always_set_home option.
That is probably because it dates back to a time before HOME was
set to the target user by sudo.
> Current description is following:
> "If enabled, sudo will set the HOME environment variable to the home director
> y of the target user (which is root unless the -u option is used). This effe
> ctively means that the -H option is always implied.
> Note that by default, HOME will be set to the home directory of the target us
> er when the env_reset option is enabled, so always_set_home only has an effec
> t for configurations where either env_reset is disabled or HOME is present in
> the env_keep list. This flag is off by default."
As of 1.8.28, the current description is:
If enabled, sudo will set the HOME environment variable to the
home directory of the target user (which is root unless sudo's
-u option is used). This option is largely obsolete and has
no effect unless the env_reset option has been disabled or HOME
is present in the env_keep list, both of which are strongly
discouraged. This flag is off by default.
I think that is much clearer than the wording in previous versions,
though I don't object to making some small tweaks if you feel it
is necessary.
You can find the updated sudoers manual at
https://www.sudo.ws/man/sudoers.man.html
- todd
More information about the sudo-workers
mailing list