From MEPIS Documentation Wiki

Jump to: navigation, search

The command visudo allows you to edit the sudoers list. Each line in this list specifies a user account (or group) and a command that can be executed by the holder of that account. It is useful if you wish to be able to start a specific program from the menu, without having to supply the root password. You have to launch the program by invoking it with sudo: sudo /usr/bin/MyProgram.

You should obviously be careful when granting a normal account sudo rights. Sudo is mostly used in scripts, that should be able to run without any user intervention.

There is a good manpage on visudo. If you open Konqueror and type in the addressbar man:/visudo you will get a good overview of all the possibilities.

A simple example:
Suppose you wish to grant yourself rights to run Guarddog directly from the menu, without having to give in the password.
Let's call your account User1.

Open console and su to root, then enter


create a new line and enter

 User1 ALL=/usr/bin/guarddog

Close visudo

 Ctrl-O (save)
 Ctrl-X (close)
 exit (close root session in console)

You should now be able to launch Guarddog from a terminal by entering sudo guarddog. If this works, you can edit the menu entry for Guarddog, and put in sudo.

Personal tools
In other languages