Requirements for executing root level commands by non-root user on Red Hat Enterprise Linux Server.

Solution Verified - Updated -

Issue

  • Non-root user is unable to execute root-level commands even after adding the account to sudoers file in /etc/sudoers.d/.

    [root@client ~]# cat /etc/sudoers.d/localuser1
    localuser1   ALL=NOPASSWD:   ALL
    [root@client ~]# su - localuser1
    [localuser1@client ~]$ sudo dmidecode -t1
    [sudo] password for localuser1:  --> Its asking for the password even after adding it to  /etc/sudoers.d/localuser1
    

Environment

  • Red Hat Enterprise Linux Server

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