Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

after I created a group, and put the root account in it, I lost control of it and now it's not root anymore. Also I can't login with "root". How can I revert this? Now there is no way I can use sudo commands. And I don't know what account the control has!

/etc/group looks like this:

root:x:0
...
developers:x:1004:thomas,website
share|improve this question
    
I do not see a question ;-) but if you want to restore/reset etc sudo permissions you can do so from either grub or a live cd. The root:x:0 is correct. Have a look at /etc/sudoers. Should contain root ALL=(ALL:ALL) ALL –  Rinzwind Jul 28 '12 at 20:39
    
howtogeek.com/howto/linux/… –  Janus Troelsen Jul 28 '12 at 20:42
    
/etc/sudoers and /etc/sudoers.d are both empty! And @Ysangkok it's the server edition so I cannot follow the tutorial since I cannot "try" it out! –  Thomas Versteeg Jul 28 '12 at 20:44
    
@ThomasVersteeg: The desktop live CD will work even with your server installation. You can use KNOPPIX or SystemRescueCd too. –  Janus Troelsen Jul 28 '12 at 21:58
add comment

1 Answer

up vote 0 down vote accepted

Not being able to login as root (other than by using sudo) is normal; Ubuntu doesn't set a password for root by default.

The empty /etc/sudoers means you can't use sudo, of course. But creating a new group shouldn't affect /etc/sudoers. You must have done something else.

The way to recover from this (short of reinstalling) is to boot into a single-user root shell. From there, you can fix /etc/sudoers, and whatever else needs fixing. Be careful while you're doing this; it's very easy to break the system by manually editing system files like this and frankly you've already done so.

To get a single-user root shell, see this question. Quick summary: Hold down the left shift key while booting and follow the prompts to get a root shell.

share|improve this answer
    
The problem was with the disk, it was set on read-only and I had to fix that to be able to change the permissions of /etc/sudoers so I could add myself as admin, thank you! –  Thomas Versteeg Jul 29 '12 at 12:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.