I need to give a user named wjobs sudo access in CentOS to restart the Apache web server. How do I give a user Sudo access in Centos Linux?
- In CentOS Linux all members of the wheel group have sudo access. So all you have to do is add the user to wheel group
- To add an existing user named foo to wheel group, run:
usermod -aG wheel foo
- To add a new user named bar to wheel group and give a user sudo access in CentOS, type:
adduser -G wheel bar
passwd bar
- That is all see the following url for more info about adding a user sudo access in CentOS Linux version 6/7/8.
https://www.cyberciti.biz/faq/add-create-a-sudo-user-on-centos-linux-8/