In this post, I am going to cover the sudoers in CentOS7. You all probably know that su means super user or substitute user and sudo means “do as su(per user)” 🙂
If you login to the system as root user, you are allowed to run all of the commands. I will try to perform several tasks as normal user for you to review the results.
Let’s try to run command by using sudo then.
If we focus on the output, we can find out that the user must exist in the sudoers file to accomplish this task. Sudoers file allows users to run commands as root user without needing the root’s password. This file must be edited with the visudo command!
According to the sudoers file shown above, we have two options to make baris.aydogmusoglu account a sudoer.
baris.aydogmusoglu ALL=(ALL) ALL
We can edit the file add the line above just under the root ALL=(ALL) ALL line.
We can add baris.aydogmusoglu user account to wheel group since each member of the group is a sudoer (according to the file shown above). Actually, I would rather prefer add user accounts the group those we want to make sudoer. I will continue with the second option.
Let’s try to run command by using sudo again.
Now, baris.aydogmusoglu user has successfully become a sudoer 🙂
I wish you have a great day.