How to disable the sudo command

> 4. **Modify the file.** Navigate to the section that looks like:
> 
> # User privilege specification
> 
> root ALL=(ALL:ALL) ALL
> 
> Below this line, add the following, replacing username with your actual username:
> 
> username ALL=(ALL:ALL) NOPASSWD: ALL

~$ gparted
Error executing command as another user: Request dismissed

Maybe you could expand with more detail about what it is you want to prevent (or allow) regarding the sudo command?

Just showing a section of your current "/etc/sudoers" file doesn't give us enough of a hint on what you are trying for.

If you want to avoid "sudo" on an ongoing basis, you can do like I did, which is to add a Panel app to open MATE Terminal then, edit the properties to show as follows:

MATEterminal_root

That way you enter the admin password once to open the terminal, and everything from that point on is done as "root", which is very dangerous and NOT recommended, unless you really know what you are doing.

There was a problem.

It is not dangerous since I am the only one who has access to my compuer.

The danger is YOU as the user making a critical mistake that corrupts your system and is unrecoverable.

1 Like

That is a good point even if I use a second drive to store my important files.

I just want to cut down on the number of times it is necessary to enter my password.

I will study what has been said as well as doing more research.

I ask a lot of questions to people who help me learn.

Making mistakes is part of that process and I learn from them.

I feel like Ubuntu is fairly close to Ubuntu-Mate.

I like to make full use of my hardware.

I am reading this


https://www.digitalocean.com/community/tutorials/how-to-edit-the-sudoers-file

The next way to gain super-user privileges allows you to become the root user at any time, as you need it.

We can do this by invoking the su command, which stands for “substitute user”. To gain root privileges, type:

su

You will be prompted for the root user’s password, after which, you will be dropped into a root shell session.

When you have finished the tasks which require root privileges, return to your normal shell by typing:

exit

It looks like

This you may already know. Sorry if it's redundant.

There are two ways to run as root, su and sudo. The first means "switch user" and if allowed, lets you become root. It's been a long time since Linux didn't frown on using su.

sudo is similar. It means "SuperUser Do." su in fact, allows you to become any user on the system, not just root. sudo does exactly what it indicates: Allows you to run a command as root, provided you have the proper credentials and authority (the sudoers file).

Here's what isn't always known:

  1. There is a time "buffer" once you run sudo. This means you can actually run more than one command without having to issue the root password each time. I'm not sure what that time value is or how to set it...
  2. You can use the -s command switch when invoking sudo (eg., sudo -s). This is effectively the same as issuing the su root command. The prompt will change to show the switch, and to return to normal usage, issue the exit command, or Ctl-D. Please note, this is very risky, and should be used with the utmost caution!
3 Likes