Re: handling of PATH, between "su - user" and "sudo --login -u user"

"Todd C. Miller" <[email protected]> Tue, 02 Jun 2020 19:52:20 -0600
Newsgroups gmane.comp.tools.sudo.user
Message-ID <[email protected]>
This is due to the "secure_path" setting in the default RHEL sudoers
file.  If you either comment out that line or adjust it you will
get the behavior you desire.

For example, you could change it to the following:

Defaults secure_path = \
    /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

or just comment that line out to get the default PATH.

 - todd
____________________________________________________________
sudo-users mailing list <[email protected]>
For list information, options, or to unsubscribe, visit:
https://www.sudo.ws/mailman/listinfo/sudo-users