• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 570
  • Last Modified:

add user to sudoers

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
David11011
Asked:
David11011
1 Solution
 
omarfaridCommented:
please see link below, it might help

http://ubuntuforums.org/showthread.php?t=1820134
0
 
amitnepalCommented:
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
 
David11011Author Commented:
Thanks that fixed it. It was a solution that didn't require me to assign Root a password. Perfect. thanks.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now