Why is the command 'sudo' throwing error "Sorry, user <user_B> is not allowed to execute '/bin/su - <user_A>' as root on <host>

Solution Verified - Updated -

Issue

  • While executing *sudo su * command terminal is throwing permission error. Why is system throwing this error?
  • Following are the lines put in /etc/sudoers to allow "USER_B" to execute "sudo su - oracle" (and this does not work, what is wrong?)
User_Alias      ORA_ADMINS = USER_B
Cmnd_Alias ORA_CMDS = /usr/bin/sudo oracle su -


ORA_ADMINS      ALL=(ALL) ORA_CMDS

  • How to fix this issue?

Environment

  • Red Hat Enterprise Linux 4,5,6

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