Ask Your Question

Fedora 29 remove Sudo

asked 2018-12-20 08:41:38 -0500

Chambers3000 gravatar image

I would like to remove the sudo function from Fedora 29. Is there a way to get rid of this and go back to good old super user?

edit retag flag offensive close merge delete



Is there a good reason to remove sudo? Why can't you just not use that command?

wallyk gravatar imagewallyk ( 2018-12-20 12:44:27 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2018-12-20 09:50:37 -0500

florian gravatar image

updated 2018-12-20 21:15:29 -0500

No need to remove the /usr/bin/sudo file!

Suggestion 1: remove your user (or all users, or specific users) from the wheel group. Only users in that group can use the sudo command. Once removed, only root has superuser power.

Suggestion 2: You can use visudo to edit the file /etc/sudoers as follow:

As root, comment (#) the line

%wheel  ALL=(ALL)   ALL


# %wheel    ALL=(ALL)   ALL

and nobody will be able to use the sudo command, even if part of wheel group.

I would strongly advice to disable sudo access only after you have created a password for user root.

edit flag offensive delete link more



root  ALL=(ALL)   ALL
florian gravatar imageflorian ( 2018-12-20 09:57:35 -0500 )edit

answered 2018-12-20 09:15:01 -0500

villykruse gravatar image

If you set a password for the root user, you could pretend that sudo is not there.

sudo passwd root

If it realy bothers you

rm /usr/bin/sudo

but don't do that unless you have a valid password for root.

edit flag offensive delete link more


Even better, use dnf remove sudo to get rid of it properly. My laptop doesn't have it installed, and the only reason it's on my desktop is that there were some packages that wouldn't update/upgrade without it. From what I can tell, their install scripts used it for some weird reason.

sideburns gravatar imagesideburns ( 2018-12-20 14:02:37 -0500 )edit

Not so simple

[root@mybox ~]# dnf remove sudo
 Problem: The operation would result in removing the following protected packages: sudo
[root@mybox ~]#

Of course you could unprotect it first.

villykruse gravatar imagevillykruse ( 2018-12-21 00:24:21 -0500 )edit

Question Tools

1 follower


Asked: 2018-12-20 08:41:38 -0500

Seen: 978 times

Last updated: Dec 20 '18