I've messed something up now

Rashkae ubuntu at tigershaunt.com
Sat Sep 24 13:34:38 UTC 2011


On 09/23/2011 11:54 PM, Knute Johnson wrote:
> I'm getting a message when I try to sudo that I'm not in the sudoers 
> file.  Any idea what I've done and how to fix it?
>
> Thanks,
>

Without more information, I suspect that when you added yourself to the 
"camera" group (in your previous thread)
you did something like usermod -G camera, which would have effectively 
destroyed your group membership and replaced it with Camera.  (You have 
to use the -a switch with usermod when adding a user to a group.  A very 
unfortunately poorly thought out command.)

As to how to fix, you need to reboot to a root shell.  When booting your 
system, activate the grub menu (I believe that is now done by holding 
the shift key when grub first starts up.) From the menu, choose the 
rescue or failsafe boot option.  You should then, at some point, be 
given the choice to boot into a root shell.  From there, you can use 
/usr/sbin/usermod -a -G admin username to give yourself sudo permissions 
again.






More information about the ubuntu-users mailing list