Sudo does not read files in /etc/sudoers.d/* which is containing "dot" character in filename

Solution Verified - Updated -

Issue

  1. Sudo drop-in file is created for user bob.smith allowing the user to run any command without password.

    # cat /etc/sudoers.d/bob.smith 
    bob.smith  ALL=(ALL)       NOPASSWD: ALL
    
  2. However, the sudo rule is not listed:

    # sudo -ll -U bob.smith
    User bob.smith is not allowed to run sudo on hostA.
    
  3. Sudo would print the rule if the line is copied into /etc/sudoers.

  4. Sudo ignores file names with "dot" character.

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • Red Hat Enterprise Linux 10
  • sudo

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