Install sudo for CentOS 5.6

Install sudo for centos 5.6


# yum install sudo
# visudo

Uncomment this ( remove the # )
# %wheel ALL=(ALL) ALL

Save and quit
:wq

To add your username

Edit the group
vi /etc/group

wheel:x:10:root,your_username

Save and quit
:wq

or

gpasswd -a iyour_username wheel

Then you can try SSH to your server, login using your username and password, after that type
After login, then type
# sudo su -

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for MY_USERNAME:
# whoami
root
#

Confirm that you can login using your username, then disable the root login.

passwd -l root

This applied to:
install sudo linux


Tags: , , , , , , , , , , , , , ,

Translate

Buy me a Caffè Latte

Thank you for the Caffè Latte

2013/02/15 saw art
2013/01/25 Parul Patel
2012/11/20 Barbara Nicholas $10
2012/10/08 Amy Stockman $5
2012/07/15 siewho chang $ 50
2012/06/08 Susan Hampton $10
2012/05/11 Chris Grima $10