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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content