Solved

add user to sudoers

Posted on 2013-07-01
3
558 Views
Last Modified: 2013-07-01
I set up an Ubuntu server in February and have been using it without any problems to host some websites and a MySQL server.

Today I logged into it to restart the server and when I run "sudo restart" it says

"administrator is not in the sudoers file. this incident will be reported"

I've never seen this before. And, I'm not sure how one day the "administrator" user would have sudo privileges and the next day it doesn't.

I restated the server in recovery mode and tried to add
"administrator ALL=(ALL:ALL) ALL"
to the /etc/sudoers file but it says that it's a read-only file system so I can't modify the file.

I tried to do "sudo useradd administrator sudo" but it gave me an error code 1. (whatever that means)

any ideas? I can't do anything on my server because I don't have sudo rights for the only user account on the server.

I've had limited past experience with linux and this is my first time running a linux server so I'm a bit of a noob. Please use childs language when explaining.
0
Comment
Question by:David11011
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 40

Accepted Solution

by:
omarfarid earned 500 total points
ID: 39290717
please see link below, it might help

http://ubuntuforums.org/showthread.php?t=1820134
0
 
LVL 7

Expert Comment

by:amitnepal
ID: 39290799
Try doing su - and enter root's password. If that does not help , then you can always reboot the machine to single user mode and change roots password.

http://blog.troyastle.com/2010/06/boot-to-single-user-mode-in-ubuntu-1004.html
0
 
LVL 2

Author Closing Comment

by:David11011
ID: 39291039
Thanks that fixed it. It was a solution that didn't require me to assign Root a password. Perfect. thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question