Quote:
Original post by gamechampionx
I took your advice and ran "sudo adduser brendan admin" but this didn't change the result of the command "groups brendan". I then tried to access System > Administration > Users and Groups. It prompted my for a password, which I entered. It then just did nothing. If I try to click on that option a second time, I get "Starting Users and Groups", which then closes itself from the taskbar. This is getting really rediculous, I need to be able to simply restore *ALL* rights to this user.
You didn't quite take my advice if you typed "sudo adduser brendan admin". :-) You need to pass the kernel the init=/bin/sh parameter so that you *don't* need to use sudo (since you can't without the password).
Here's what I did. It's a bit trickier than I thought because of initrd :
boot normally in Ubuntu and as a plain user, read /boot/grub/menu.lst. I used "less", but you can use any text editor you want to read it, it's just plain text. Find the menu entry below ## ## End Default Options ##. You'll see something like this:
title Ubuntu, kernel 2.6.12-10-386
root (hd0,0)
kernel /boot/vmlinuz-2.6.12-10-386 root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.12-10-386
savedefault
boot
Write this down (beware of typos) or print it for future reference, then reboot and get Grub to give you a command line (here I have to hit Escape and once at the menu hit 'c'). Once you see the "grub> " prompt, type :
grub> root (hd0,0)
grub> kernel /boot/vmlinuz-2.6.12-10-386 root=/dev/hda1 rw init=/bin/sh
grub> initrd /boot/initrd.img-2.6.12-10-386
grub> boot
Substitute this with the values you got from /boot/grub/menu.lst if they differ. Note that Grub will write the result of each command after you press enter. I didn't bother writing it down here. Be wary of typos are Grub has no way to assert that your command is correct in many cases (most of it is passed "as-is" to the kernel).
Wait for it to boot up then:
# groups brendan
brendan adm dialout cdrom floppy audio dip video plugdev lpadmin scanner
# useradd brendan admin
# groups brendan
brendan adm dialout cdrom floppy audio dip video plugdev lpadmin scanner admin
# sync
# reboot
If you get an error message when trying to use "useradd" telling you that it couldn't acquire a lock, it's possible that the partition was remounted read-only after an error. Remount it with read-write permissions:
# mount -o remount,rw /dev/hda1 /
And try again. I did all the above here and it worked flawlessly.
Hope this helps.