sudo gives 'PERM_SUDOERS: setresuid(-1, 1, -1): Operation not permitted' error

Solution Verified - Updated -

Issue

  • Running the sudo command fails with the following error:
$ sudo su -
sudo: PERM_SUDOERS: setresuid(-1, 1, -1): Operation not permitted
sudo: no valid sudoers sources found, quitting
sudo: setresuid() [0, 0, 0] -> [505, -1, -1]: Operation not permitted
sudo: unable to initialize policy plugin
  • The problem happens if we login as a non-root user and then run sudo, but it works fine if we run su - testuser when logged in as root.

Environment

  • Red Hat Enterprise Linux 7.x
  • sudo
  • SELinux in Enforcing mode

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