Ask Your Question

Fedora 25 - Fix broken sudo

asked 2017-07-22 07:21:36 -0500

Pinaki gravatar image

Somehow, permission in my Fedora got messed up. I don't see root is owner of /usr/bin/sudo directory and I am not able to execute any command using sudo. I am trying to find a solution but the solution I am seeing Ubuntu specific. Can some one please provide me steps to fix in Fedora.


sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

edit retag flag offensive close merge delete


Do you have some other way than sudo to get root access? Root privileges of some form are certainly necessary for fixing those sudo permissions.

muep gravatar imagemuep ( 2017-07-22 11:26:44 -0500 )edit

Try ctrl-alt-f2 to get to text terminal, login as root, and correct the permissions settings from there.

SteveEbey73701 gravatar imageSteveEbey73701 ( 2017-07-22 11:33:16 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-07-22 15:26:18 -0500

updated 2017-07-23 11:57:56 -0500

Boot to recovery mode or log in as root if you can and run:

chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo

same as with Ubuntu.

You may have other problems with permissions and ownership, one advantage of .rpm systems however is you can chack and reset them easily:

for p in $(rpm -qa); do rpm --setugids $p; done
for p in $(rpm -qa); do rpm --setperms $p; done

See man rpm or for details

edit flag offensive delete link more



Do run the setugids before running setperms, as modifying the uid and gid will clear the suid and guid bits in the perms.

villykruse gravatar imagevillykruse ( 2017-07-23 00:37:51 -0500 )edit

Question Tools

1 follower


Asked: 2017-07-22 07:21:36 -0500

Seen: 384 times

Last updated: Jul 23 '17