Thursday, May 9, 2024
 Popular · Latest · Hot · Upcoming
68
rated 0 times [  68] [ 0]  / answers: 1 / hits: 76108  / 1 Year ago, thu, march 2, 2023, 6:27:04

I clean-installed Ubuntu 11.10 today, and then installed VirtualBox. This required me to add myself to the vboxusers group, and since 11.10 seems to no longer have a graphical app to add users to a group, I ran the following command:



sudo usermod -G vboxusers stephane


This is a problem. I now see what I should have run instead is:



sudo usermod -aG vboxusers stephane


The end result is I'm no longer in the groups I should be in. Including whatever group is required to run "sudo". When I run any command as sudo now, I get the following:



$ sudo ls
[sudo] password for stephane:
stephane is not in the sudoers file. This incident will be reported.


Is there a way to fix this, or do I need to re-install from scratch again?


More From » permissions

 Answers
0

  1. During boot, press and hold the left Shift key, and you should see the GRUB menu.


  2. Select the entry containing (recovery mode) and wait.


  3. You should now be presented with a menu. Select:



    remount    Remount / read/write and mount all other file systems 


    and wait for your file systems to get mounted with read/write permissions, then press Enter.



    If this option doesn't appear or won't work, you can instead choose the root option and use the following command to mount the system partition:



    mount -o remount /


    You can check out which is your system partition with fsck command or by viewing /etc/mtab.



    After successfully running the mount command (i.e. no error messages), proceed directly to step 5 below.


  4. After choosing the remount option, the menu comes up again. Select:



    root       Drop to root shell prompt

  5. Now enter one of the following commands to re-add your user to the admin group (for Ubuntu 11.10 and earlier):



    adduser <USERNAME> admin


    or to the sudo group (for Ubuntu 12.04 and later):



    adduser <USERNAME> sudo

  6. Reboot and you should be able to use sudo again.



[#42696] Saturday, March 4, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nstitutencert

Total Points: 171
Total Questions: 126
Total Answers: 124

Location: Azerbaijan
Member since Fri, May 12, 2023
1 Year ago
nstitutencert questions
Fri, Dec 10, 21, 16:31, 2 Years ago
Tue, Apr 19, 22, 05:51, 2 Years ago
Wed, Jan 26, 22, 07:52, 2 Years ago
Sun, Aug 29, 21, 21:43, 3 Years ago
;