sudo Defaults secure_path list addition

Solution In Progress - Updated -

Issue

We tried to extend the secure_path default with an include file in /etc/sudoers.d, but it seems to not work. Specifically we have added /etc/sudoers.d/path with the following content:

Defaults    secure_path += /usr/local/bin

In /etc/sudoers, the secure_path is set to:

Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin

We expected to get /usr/sbin/local:/sbin:/bin:/usr/sbin:/usr/bin, but the result is /usr/sbin/local. Why is that the case?

Environment

  • Red Hat Enterprise Linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.