sudo problem
Marius Gedminas
marius at pov.lt
Sat Jul 20 09:38:15 UTC 2013
On Fri, Jul 19, 2013 at 08:39:41PM -0700, Bob wrote:
> I am a new Ubuntu user. I installed virtualbox and was trying to
> configure it. I added my userid (using usermod) to the virtualusers
> group so I could access USB devices from virtualbox, USB devices now
> work.
>
> Sudo worked to add my userid to the virtualbox group but did not work
> afterwards. I don't know if adding my userid to the group caused the
> problem or not but now I get an error message when I use the sudo
> command.
I'm guessing your usermod command replaced the list of groups instead of
just adding one more group to it. Now your user is no longer part of
the 'sudo' group and as such is not allowed to use sudo any more.
Personally, I prefer 'adduser username groupname' for adding users to
groups. It may be somewhat less standard (AFAIU it's a Debian
invention, while usermod exists on other distributions too), but is easy
to remember.
> [sudo] password for bob:
> bob is not in the sudoers file. This incident will be reported.
> bob at Saturn:~$
>
> I don't see anything in the sudoers file that would have anything to do with
> this problem.
Right.
> The /etc/group file has 'sudo:x:27:'. Can I edit that file (using the Ubuntu
> CD) and add my userid to make it 'sudo:x:27:bob' to fix this problem?
Yes.
Or you could reboot into rescue mode (hold down shift while the machine
is booting to get the boot menu), get a root shell, and run
adduser bob sudo
HTH,
Marius Gedminas
--
Bumper sticker: No radio - Already stolen.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20130720/d77744f5/attachment.sig>
More information about the ubuntu-users
mailing list