PDA

View Full Version : user group modifictaion via command line


unicron0827
February 13th, 2008, 11:01 AM
a coworker of mind was trying to mess with user admin, and somehow broke it.

he enabled the root account but not root login and at the same time removed ADMIN from his only account (user-operator, for syntax sake) secondary group list

and now everytime he tries to make any setting change, or anything else that involves SU/SUDO it fails on both his password and the root password, is there any way to fix this, im presuming its via command line

Jussi Kukkonen
February 13th, 2008, 12:10 PM
Boot into single user mode (you'll be root), then set password or change the groups as you like.Booting into single user mode is possible just by selecting the option in grub on a default ubuntu install, IIRC

k_grdn
February 13th, 2008, 04:52 PM
Hi,

You'll need the root password for single user mode. :(

At grub menu, esc, e to edit then add:

init=/bin/bash

To the end of the kernel string.

Regards,

k_grdn

Jussi Kukkonen
February 14th, 2008, 11:26 AM
You'll need the root password for single user mode.
oh? I know Debian does that, but I thought Ubuntu didn't... Good to know.

EDIT: Now that I think about it, it probably depends on whether root password is set. :)

The Cog
February 17th, 2008, 10:02 AM
Ubuntu has a mod whereby if no root password is set (as with a standard install) then single-user mode drops into a shell without even asking for a password.

bodhi.zazen
February 18th, 2008, 01:35 PM
a coworker of mind was trying to mess with user admin, and somehow broke it.

he enabled the root account but not root login and at the same time removed ADMIN from his only account (user-operator, for syntax sake) secondary group list

and now everytime he tries to make any setting change, or anything else that involves SU/SUDO it fails on both his password and the root password, is there any way to fix this, im presuming its via command line

The way to fix the problem is to boot a live CD, mount your ubuntu partition at say /media/ubuntu

Then edit /media/ubuntu/etc/group and add the user back to the admin group.