SUDO

In this example we provide permission to use some administrative command to non-administrative user.

Here we can see “eric” users have no rights to use “ifup” command. 

clip_image001

With “whereis” command get absolute path of command ( /sbin/ifup ).

clip_image002

Provide access using “visudo” command or to modify by “/etc/sudoers” file.

clip_image003

clip_image005

Now try to execute command. In the password put user password to confirm once.

clip_image006

Here we provide “setup” command to run by non-administrative user.

Here we can see for “setup” command we need root authentication.

clip_image007

Doing same thing. Search path and put this information in “visudo” command or “/ect/sudoers” file.

clip_image009

clip_image010

clip_image011

 

clip_image012

clip_image013

 

 

 

 

How to set sudo on Group.

Create a user with group “eric”

clip_image015

Set group eric in sudo for run given command.

clip_image016

clip_image018