howtothings.co.uk
User is not in the sudoers file. This incident will be reported. CentOS - Printable Version

+- howtothings.co.uk (https://www.howtothings.co.uk)
+-- Forum: Computing (https://www.howtothings.co.uk/forumdisplay.php?fid=4)
+--- Forum: Operating System and Software Support (https://www.howtothings.co.uk/forumdisplay.php?fid=17)
+--- Thread: User is not in the sudoers file. This incident will be reported. CentOS (/showthread.php?tid=2239)



User is not in the sudoers file. This incident will be reported. CentOS - Mark - 07-07-2014

You will get the error message
%username% is not in the sudoers file. This incident will be reported.

If you try to escalate your user account to root using a command similar to sudo -i

CentOS actually have a good wiki article on how to become root here: http://wiki.centos.org/TipsAndTricks/BecomingRoot#head-5a98c43bd135904d720095ff461d52aa7b51412d


Steps

Escalate / switch user to root
Code:
su - root

Edit sudoers file
Code:
nano /etc/sudoers

At the bottom add
Code:
# Allow user accounts to sudo
Mark    ALL=(ALL)       ALL

ctrl + o then ctrl + x

Log out then back in