Click to See Complete Forum and Search --> : where did the root go?


Alex Merek
03-04-2002, 12:17 PM
Okay, this is fun.. I've been working on this for days now and it keeps getting better and better.

Fiddling with RedHat 7.0. After having been messing with etc/hosts and adding users for a couple of hours trying to fix my samba problem (http://www.linuxnewbie.org/cgi-bin/ubbcgi/ultimatebb.cgi?ubb=get_topic&f=13&t=005909) I was like - oh let me reboot, maybe it will help. So I did and now it wont even recognize my root login! I'm thinking it has something to do with me adding some new users using 'smbuseradd' and just 'useradd' and possibly adding a couple of new lines in etc/hosts to specify my win2k box netbios name as well as changing 'localhost' to 'linuxbox'?

Anyway, if someone could give a word of advice, would be sweet.. before I finish downloading slackware =) thanks much!

mdwatts
03-04-2002, 01:23 PM
If you can't logon as root, then try as a user and then su to root.

If that doesn't work you will have to boot into linux single and attempt to fix whatever you did.

Alex Merek
03-04-2002, 01:47 PM
hey thanks,
I can log in as one of the users but su doesnt work. I guess somehow my root password got changed? No idea how that could have happened but okay.. Should I try running the install in rescue mode? Or what do you mean by booting into linux single?

thanks

ScRapZ_1
03-04-2002, 01:52 PM
Its a cheat that is alarminly simple to accomplish. When you get the LILO prompt, hit CTRL-x and type linux single and that will start it up as a single user only, root. When you get the prompt, type passwd and enter a new password. Reboot as per usual and use the new password for now on, the old one is history.

As you can see, this is drastically simple for someone to get access to your computer this way, especially if they can reboot your computer and use the LILO prompt. So keep this in mind.

TTFN,
ScRapZ_1 :p

Alex Merek
03-04-2002, 02:25 PM
woo! now that was fun. I was about to reinstall the whole thing AGAIN =P thanks much folks!

slapNUT
03-04-2002, 02:31 PM
Posted by ScRapZ_1
As you can see, this is drastically simple for someone to get access to your computer this way, especially if they can reboot your computer and use the LILO prompt. So keep this in mind.

It's also simple to prevent, for each image that lilo can pass arguements to:

image=/boot/vmlinuz
restricted
password=<password>

Just don't forget that password, and hide all the bootdisks.

But above all else remember this: If someone has physical access to a computer then that computer is not secure.

mychl
03-04-2002, 03:09 PM
So now that you have a password stored in your lilo.conf file, you need to make sure you chmod 600 lilo.conf, otherwise users could just open the file and read your password, reboot, and they're in.

That's a nice trick, thanks for sharing it, I just implemented that on both my linux boxen... :D