Ask Your Question

Prevent user from accessing to "su/sudo" command

asked 2014-06-13 08:18:59 -0500

Caterpillar gravatar image

Is it possible to block access to su/sudo command for a specific user?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-06-13 15:16:39 -0500

KevinA gravatar image

On Fedora (and more than likely most distributions) the default control for if someone can access sudo is based on if they are in the wheel group. With regard to su access the best solution is to not give them the root password.

To remove a user from the wheel group you can use gpasswd -d [username] wheel

edit flag offensive delete link more


Yes, remove the user from the wheel group.

florian gravatar imageflorian ( 2014-06-13 21:25:33 -0500 )edit

It can be also done graphically in Gnome: Settings->Users->Account Type should become standard rather than administrator. It also can be done with "Users and Groups" application.

hedayat gravatar imagehedayat ( 2014-06-14 03:00:48 -0500 )edit

No one of users (even mine) in my computer is part of wheel group

Caterpillar gravatar imageCaterpillar ( 2014-06-15 10:38:26 -0500 )edit

Are you sure? DId you run the command id from your shell? (if you are using system-settings-users: de-activate the filter for system users and groups (under settings)). Are you using Fedora?

florian gravatar imageflorian ( 2014-06-15 11:24:45 -0500 )edit

So, none of them should be able to use sudo.

hedayat gravatar imagehedayat ( 2014-06-15 11:27:18 -0500 )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


Asked: 2014-06-13 08:18:59 -0500

Seen: 869 times

Last updated: Jun 13 '14