sudo problem
Bob
ubuntu-qygzanxc at listemail.net
Sat Jul 20 20:39:42 UTC 2013
** Reply to message from Marius Gedminas <marius at pov.lt> on Sat, 20 Jul 2013
12:38:15 +0300
Thanks to all that replied.
> 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.
I went to a users group (a differsnt OS) meeting today and talked to a couple
of Lunix users. So I now know what I did wrong.
The usermod command I used did not have a -a parameter. I have the book Ubuntu
Unleashed (trying to get up to speed) which shows a usermod command without the
-a. So that wiped out all of my privileges.
> 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.
I think I will use the adduser command for this from now on.
> > [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
I have not tried that yet. I will but it on my todo list.
What I did was boot from the Ubuntu CD and copied /etc/group- over /etc/group.
That fixed my sudo problem.
--
Robert Blair
More information about the ubuntu-users
mailing list