Solved

add user to sudoers

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

744 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

13 Experts available now in Live!

Get 1:1 Help Now