What is and how to setup SUDO in Linux

First of all, happy 2008 to everybody. To begin 2008 a post about SUDO and security configuration.
The program sudo (SuperUser DO) is an utility from the unix operating systems like Linux, BSD or MAC OS X, that gives the normal users the possibility to execute programs with security privileges of the admin user (root).

How to set it up ?
Write “visudo” as the administrator
# Host alias specification
# Here you set up the hosts from where should the rule be applied, in this it is for local users
Host_Alias LOCALHOST=127.0.0.1
# User alias specification
# SYS is just a group name, it can be any string, you will use it later in this same file.
User_Alias SYS=user1, walter, user2
# Here we define the binaries that can be executed.
Cmnd_Alias SQA=/root/sudoers/program1.sh,\
/root/sudoers/program2.sh,\
/root/sudoers/program3.sh
# User privilege specification
root ALL=(ALL) ALL
# This specifies that no password has to be asked when executing the command.
SYS LOCALHOST=NOPASSWD: SYS

Advertisements