Sudoers centos

Username is not in the sudoers file. This incident will be reported

To solve this follow below steps:
  • Go to home directory by running command cd -
  • Then typesu -

  • It will ask you for password then type your login password you will be in root user     
    [user@localhost ~]$ su - 
    Password: 
    [root@localhost ~]# visudo 
  • Then add  
    username        ALL=(ALL)      ALL

    to sudoers

  • Save and exit

Leave a Reply

Be the First to Comment!

avatar
  Subscribe  
Notify of

Leave a Comment

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