navigation, content, portlets

Sudo

How to use sudo correctly.
How to use sudo correctly.

sudo is a program which allows regular users to run certain commands as root without needing to know the root password – it either checks the user's own password, or if configured correctly, may not even need a password at all. sudo is included in Ultima Linux's ap series, and is used instead of the standard su command to grant root privileges under KDE.

Contents

Usage

To use sudo, your system must be configured to allow sudo access. (See configuration.)

At the command line, you can run certain commands as root, such as:

multima@evilblah:~$ sudo mount /dev/sdb1 /mnt/usb

which mounts a flash drive or SCSI disk on /mnt/usb (although this is just an example, most new releases use HAL to automatically handle disk-mounting instead).

You can also become root by running:

multima@evilblah:~$ sudo su

or

multima@evilblah:~$ sudo su -l

the latter of which provides a slightly more powerful "login shell".

In KDE, root access to certain applications – for example, the boot manager configuration in the Control Center – is handled by the kdesu application, which uses sudo1 to grant root access when needed. KDE applications do not need to be run from the command line.

Note that sudo make me a sandwich is not particularly effective unless somehow you've found a program where there is a make target called "me a sandwich", and does not work at all in real life2. If this does not make the slightest bit of sense, try compiling Ultima Linux from source a few times, eventually you'll get it.

1 In Ultima Linux 8.2 and newer.
2 Yet.

Configuration

sudo is controlled by the /etc/sudoers file, but this file should NEVER be edited except with the visudo command – that way any errors can be caught and corrected before they can damage your system.

In Ultima Linux 8.1, the first user account created (during initial system setup) is granted full passwordless sudo access. Starting in 8.2, the default user account has full passwordless sudo access, and all other user accounts have limited access to KDE applications (and are required to enter their own passwords).

Security

Be sure to use a strong password on all sudo-enabled user accounts, particularly ones with passwordless access! You should also make sure to have a strong root password – 99% of the time you won't need access to root's account anyway if you're using sudo.

Disabling sudo

This article or section is a stub. You can help us by editing or expanding it.

External links