I've lost sudo access and I don't really understand why
Tom H
tomh0665 at gmail.com
Wed Mar 18 23:04:07 UTC 2020
On Wed, Mar 18, 2020 at 11:38 PM Tom H <tomh0665 at gmail.com> wrote:
>
> On Wed, Mar 18, 2020 at 9:57 PM Chris Green <cl at isbd.net> wrote:
> >
> > I'm running xubuntu 19.10 and I've somehow lost the ability to sudo to
> > root.
> >
> > I *suspect* the cause was doing a usermod command to add my user to
> > group vboxusers (so that VirtualBox USB works). Since I did that I get
> > the following error when I try to do anything as root using sudo:-
> >
> > ris at esprimo$ sudo reboot
> > [sudo] password for chris:
> > Sorry, user chris is not allowed to execute '/usr/sbin/reboot' as root
> > on esprimo.zbmc.eu.
> > chris at esprimo$
> >
> > So how do I get my root access back (and at the same time not lose
> > being in vboxusers for VirtualBox)?
>
> You should've used
>
> usermod -aG vboxusers chris
> NOT
> usermod -G vboxusers chris
>
> You'll have to reboot in single-user mode (or reboot to the initramfs
> shell, if you want to do more work) and run
>
> usermod -aG sudo chris
I've just realized that you might not be able to use single-user mode
without being able to use sudo.
More information about the ubuntu-users
mailing list