Banner Exchange

User is not in sudoers file. This incident will be reported. CentOS – Linux [Resolved]

CentOS-User-is-not-in-sudoers-file

I was trying to install VNC server on CentOS 6.5 when I ran into the error message, “John is not in sudoers file. This incident will be reported“. I’m somewhat new to CentOS and Linux in general. I know my way around but I’m not expert, yet. I found some instructions online but of course it was a command line.

I was running the following command at the Terminal to edit the sudoer file and got stuck.

visudo

When the editor appeared, I had a hard time navigating the file, saving and even exiting. My first attempt at editing the file failed. Then something odd happened each time I would try to re-open the sudoers file. I would receive an error message stating something about a swap file. Needless to say, it was driving me crazy.

Instead of editing the file using Terminal. I thought maybe I could just open the file like you would in Windows. That did it for me. It worked! I had to log off then sign back into the server as root to do it though.

Logged in as root, using the File Browser I navigated to File System then opened the etc folder. I found and double-clicked on the sudoers file. Then towards the bottom of the sudoers file I located the following line.

root      ALL=(ALL)     NO PASSWD: ALL

I changed it to:

%admin      ALL=(ALL)     NO PASSWD: ALL

then clicked Save.

sudoers-file

The %admin stands for the admin group. If you do not have an admin group, simply create one. Go to System > Administration > Users and Groups. Click on Add Group, name it admin. Next add yourself to the admin group.

centos-6.5-user-manager

You may receive an error message saying the sudoers file is in Read Only mode. If this happens to you, go back to the File Browser and right click on the sudoers file. Select Properties then click on the Permissions tab. Under the sections labeled Owner and Group, change Read Only to Read and Write.

Now, my standard user account has greater administrative privileges. I feel spoiled, I must be a real computer nerd.

In the end, I was able to get a VNC server installed and working in CentOS 6.5 that automatically starts up on boot up. WHAT, WHAT!!

If you have questions about editing your sudoers file in CentOS, please leave them below. I’ll try my best to help you out.

Comments

comments

Tags: , , , , , , ,

Category: Computer How-To, Linux

About the Author ()

John Bousman is an MCSA, MCTS, MCP, Net+ and A+ Certified Technician. He is also an avid Web Developer, WordPress Jedi, SEO Connoisseur and owner of an IT Firm in the Midwest. During the day he helps tackles Server Administration and Desktop Support issues for small business. With over 15 years experience installing, configuring and troubleshooting retail and enterprise software, he's seen it all. Make sure you checkout his profile on Google+.

Leave a Reply

 

Comments

comments

Buy Targeted Traffic
Banner Exchange
More in Computer How-To, Linux (3 of 15 articles)
asus-aswm


Has anyone gotten the ASUS ASWM Enterprise monitoring software installed and working on Linux? More specifically CentOS 6.5? I just ...