Sudo in CentOS —

I use alot of Ubuntu.. and in Ubuntu your first created user always has sudo access.. but in CentOS and in OpenSuse you do not.. so here is how to grant that access..

First in both you log in as yourself and open a terminal.

You then change user to root

su root
Put in your root password when prompted.

Edit the sudoers file
vi /etc/sudoers

in vi ( I hope you are comfy in vi.. I’ll write another post about it soon I’m sure. ) look for a line that sez

root ALL=(ALL) ALL
and add a line under it just like it that sez

username ALL=(ALL) ALL
(replace username with your user’s name.. of course.. )

save the file. (in vi you press esc and then :wq! )

Categorised as: CentOS | Geeking Out | Linux

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.