sudoers disaster

Vram lamsokvr at xprt.net
Wed Sep 28 20:48:56 UTC 2005


On Wed, 2005-09-28 at 13:38 -0700, Karl Hegbloom wrote:
> On Wed, 2005-09-28 at 21:27 +0100, Robbo wrote:
> > login as the user your know that should have admin rights and type in
> > groups and check if "admin" is listed.  If it isn't you'll need to add
> > it using "usermod -G admin username".  
> 
> No, that's wrong.  Use:
> 
>  adduser username admin
> 
> The 'usermod' command above will remove that user from all groups but
> 'admin'.  That's not quite what you want.  You want them to stay in all
> of the groups they are in, plus 'admin'.
> 
> See:  man adduser, adduser --help, man deluser, deluser --help, man
> useradd, man groupadd, groupadd --help, man usermod, man groupadd, man
> groupmod.



I thought you had to be root or sudo to addusers..?????

Vram





> 
> > To do this (I presume you can't log in as root), you need to go into
> > single user mode. 
> > 
> > To boot in single mode...
> > 
> > 1. You might have to press <ESC> to see your boot menu (you will see a
> > prompt)
> > 2. Choose the kernel you want to boot using the arrow buttons on your
> > keyboard
> > 3. Press "e" for edit
> 
> You may need to use 'p' and type the access password first, if you've
> secured Grub by enabling the password in /boot/grub/menu.lst.  That's a
> good idea if the computer is in an environment where you cannot trust
> everyone who has physical access to it.
> 
> > 4. Press the "end" button on your keyboard, type in a comma space ", "
> > and then type "single"
> 
> No comma, but use a space.  Or you can simply pick the "recovery mode"
> menu item.
> 
> > 5. Press <ENTER> and than "b" to boot that kernel, this will take you
> > into single user mode.
> 
> Yes.  And will prompt for the root password iff one has been set.  You
> can set a root password with the 'passwd' command if you like.  There's
> no reason to if you've secured the Grub menu.
> 
> -- 
> Karl Hegbloom <hegbloom at pdx.edu>
> 
> 





More information about the ubuntu-users mailing list