My Blog List

Thursday, July 1, 2010

SUDO Configuretion

############# SUDO Configuretion ################


With sudo we can give the root privilege to the normal users.
With sudo a normal users can access the some commands as like a root.

To open the Configuretion file.

#vim /etc/sudoers

Line No - 84

## Same thing without a password
 %wheel ALL=(ALL)       NOPASSWD: ALL
suresh  ALL=(ALL)       NOPASSWD: ALL
sudo    ALL=(ALL)       NOPASSWD: ALL
rajesh  ALL=(ALL)       NOPASSWD: ALL

Line No - 91

%users  ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom, /sbin/lspci, /usr/sbin/neat

To check.(Example)
#su (user name)
#su rajesh
We get above shell
[rajesh@server1 root]$

[rajesh@server1 root]$cd
[rajesh@server1 ~]$sudo neat

To check.
[root@server1 ~]# sudo -l
User root may run the following commands on this host:
    (ALL) ALL
    (ALL) NOPASSWD: ALL

[rajesh@server1 ~]$ sudo tail /var/log/messages


############### END ################

By Laxman D. Kadam
Ph. No. 9967413230
email:-vikasjk3@gmail.com

No comments:

Post a Comment