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.

I do not know the root password. I am only in group root. How do I add myself to other groups?

I am getting this error on trying to open root terminal:

Failed to run /usr/bin/x-terminal-emulator as user root.

The underlying authorization mechanism (sudo) does not allow you to run this program. Contact the system administrator.

share|improve this question

2 Answers 2

As you do not have root access anymore, you cannot add yourself to the admin group. To do this, you need to boot in recovery mode to get root permissions.

  1. Restart your computer, and hold Shift (for GRUB2) for showing the boot menu
  2. Select "Ubuntu, with Linux 2.6.xx-xx-generic (recovery mode)"
  3. Pick "Root shell" from the recovery menu
  4. Add user abc to the admin group by running: usermod -a -G admin abc. The -a switch causes the group admin be added to current groups, instead of replacing the current groups.
  5. Reboot your system by running reboot
share|improve this answer

Try opening a terminal and typing

 sudo bash

It will become a root terminal.

share|improve this answer
    
abc@ubuntu:~$ sudo bash [sudo] password for abc: abc is not in the sudoers file. This incident will be reported. abc@ubuntu:~$ –  abc Jan 23 '11 at 6:59
    
@abc, how comes you're in the root group and not in the sudoers? Anyway, the only solution I see is: boot a live distro and manually edit /etc/groups to add your username after the last : of all the lines referring to groups you'd like to be in (for instance, adm:x:4:abc) –  cbrandolino Jan 23 '11 at 7:05
    
I did a usermod without -a option. By live distro you mean a live CD ? –  abc Jan 23 '11 at 7:10
    
@abc: yep. or usb key. –  cbrandolino Jan 23 '11 at 7:30
4  
Your user should not be in the group root or sudo or whatever. It just needs to be in admin for sudo to work (unless you changed things in /etc/sudoers). –  htorque Jan 23 '11 at 10:29

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.