Ubuntu Forums Archive Viewer

user group modifictaion via command line

Archived thread 695731 from Security Discussions. Markdown source: Security_Discussions/thread_695731_user_group_modifictaion_via_command_line.md

Original URL About this archive
#1

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

#2

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

#3

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

#4

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. :)

#5

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.

#6

unicron0827 said: 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.