Allow group sudo

From linuxers.org

How to allow users in a group to run all commands in Fedora / CentOS using sudo

This tutorial will guide you on how to allow a group of users to run all the commands without sharing your system root password in Fedora / Redhat / CentOS based Distros.

This is similar to the sudo in Ubuntu. Here we will start by creating a group called “sysadmin”, then we will append a user “chia” to that group which will be able to run any command on the system. Lets start by creating a group and adding a user to it.

[root]# groupadd sysadmin

[root]# usermod -aG sysadmin chia

Now edit the /etc/sudoers. Its possible to edit the file in an editor, but its safer to use visudo instead.

[root]# visudo

Add the following line to the file

%sysadmin ALL=(ALL) ALL

Now you can login as user “chia” and run any command by appending sudo.

[chia]$ sudo ifconfig

You can also gain access to root shell by using password of user “chia”

[chia]$ sudo -s

[sudo] password for chia:

[root]#

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....