Solved

add user to sudoers

Posted on 2013-07-01
3
543 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

895 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now