Sudo, Visudo -bash: visudo: command not found

Visudo is needed to make modifications to the sudoers file. In a fresh install of CentOS “sudoers” file is not normally found. To install visudo issue the command

$ yum -y install sudo

As a sys admin, you need to be careful when performing tasks with root privileges. To be cautious, you can create a new user and assign him with root privileges using “visudo”

$ /usr/sbin/visudo

# User privilege specification
root ALL=(ALL) ALL
test ALL=(ALL) ALL

In the above file, test is a new user created with root privileges. In order for the “test” user to have root privileges, command “sudo” should be used. It prevents the user from issuing any commands that can cause system wide havoc and it also logs the command inside “/var/log/secure” for review

Share

Written by kurinchilamp


Website: http://

Leave a Reply

Your email address will not be published. Required fields are marked *

Kurinchi Calendar
January 2014
M T W T F S S
« Dec   Feb »
 12345
6789101112
13141516171819
20212223242526
2728293031