Ask Your Question
1

Fedora 29 remove Sudo

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

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

Comments

1

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 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

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

florian gravatar image

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

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

Comments

or:

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

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

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

Comments

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 -0600 )edit

Not so simple

[root@mybox ~]# dnf remove sudo
Error: 
 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 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 98 times

Last updated: Dec 20 '18