sudo gives 'PERM_SUDOERS: setresuid(-1, 1, -1): Operation not permitted' error
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
inEnforcing
mode
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.