?
Solved

add user to sudoers

Posted on 2013-07-01
3
Medium Priority
?
564 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

762 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