Page 1 of 1

Posted: Wed Jul 04, 2007 8:11 pm
by scorp123
You shouldn't have touched the root account ... I'm afraid but you will have to reinstall. :?

BTW, this isn't Windows. "administrator" here only means "has the right to use 'sudo' and thus temporarily become 'root' ". The real "administrator" with the real infinite God-like powers always is "root". You should never ever login to a GUI using the "root" account: you get too many powers and you could do too many scary things to your system and nothing will stop you ... root's actions are never to be questioned by the computer, whatever happens will happen!

The best thing for you would be to leave the "root" account "as is" and not enable it, only use root's functions via "sudo".

One of the things that most likely happened is that by renaming you locked yourself out of /etc/sudoers ... Another thing you shouldn't do. Never ever rename an account ... There may be plenty of entries somewhere else in the system and incorrectly renaming your account without taking care of those extra-entries in all those other places definitely will have bad consequences.

Posted: Thu Jul 05, 2007 2:25 am
by Boo
here is a fix.

boot off the mint CD.

open a terminal, and mount you old / file system

sudo mount /dev/sda1 /mnt

now you set you old / as the current root file system

sudo chroot /mnt

now be careful as you are root.
edit the /etc/passwd file and change your user account name from root to Gabe, the account will have a UID of 1000 NOT 0. save and close.

nano /etc/passwd

now exit the chroot terminal

exit

reboot and login as Gabe.
use sudo in the future not the root account.

:D

Posted: Thu Jul 05, 2007 8:00 pm
by Boo
It will work with ubuntu too.

things to check:
/dev/sda1 may not be your / filesystem so you may have to change it.
you could use gparted to look at you partitions in a gui to make it easier to find /.

nano is an easy to use text editor but you could use pico or vi.

you can use any live CD distro to do this not just Mint, ubuntu will do.

:D

Posted: Sat Jul 07, 2007 8:31 am
by Boo
so gabe is no longer a sudoer.

people in the admin group are sudoers.
so run

cat /etc/group | grep admin

if your user name is not in that group then you will have to add it.
there are 2 ways.
if you can login as root you can run the command

usermod -G admin gabe

or you have to use the live cd again and sudo the same command.

Remember Linux is case sensitive so make sure you are consistent.

:D