I've lost sudo access and I don't really understand why
Chris Green
cl at isbd.net
Thu Mar 19 08:54:28 UTC 2020
On Thu, Mar 19, 2020 at 12:04:07AM +0100, Tom H wrote:
> 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.
>
I think one becomes root in single user mode, at least I hope one
does! (OP here).
If not then I'll have to boot from an installation disk and go into
'try Linux out' mode, mount the disk I need to modify and edit it from
there. All quite do-able but a bit of a nuisance.
--
Chris Green
More information about the ubuntu-users
mailing list