LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Mandrake Linux Root Pswd/Login HELP (https://www.linuxquestions.org/questions/linux-security-4/mandrake-linux-root-pswd-login-help-39237/)

ElZora 12-23-2002 10:12 PM

Mandrake Linux Root Pswd/Login HELP
 
My father set up my personal domains on our home computer Mandrake Linux server.

He died November 19, 2002 without ever giving the password to anyone. Our backdoor took an exit stage left.

I've tried sever Lilo root password hacks, but it still will not let me login for it still requires a login username AND password. What either are, I don't know.

From the little hastened research I've done I think I've come to the conclusion that this is a "shadow" password.

Unfortunately, I am a Windows user and know jack about Linux... yet. This was no issue until I discovered that my domains are unviewable.

http://www.elzora.com
http://www.laghalda.com

If anyone can help me, please, I'd most appreciate it!

Signed,
Totally Lost and Helpless Windows User
:confused:

P.S. Almost forgot... Spot (the server) routes our DSL with a timer somehow as well and it needs to be corrected...

iocain 12-24-2002 09:04 AM

You need to get either a Linux 'rescue floppy' or bootable CD such as Knoppix. Once you boot from the floppy or CD, you can use the command line to check where the 'root' partition is located on your hard drive. You would then mount that and edit the file '/etc/shadow' to remove the password from the 'root' account. Obviously, there are a couple tools you need to become familiar with before jumping in to this if you don't want to risk trashing the system you're trying to recover!

Burn yourself a Knoppix CD. That's an excellent tool to start with.

ElZora 12-25-2002 10:17 AM

Thanks, I'll give that a try.

Not sure what most of it means or how to do it... but I'll give it a shot! What are the chances I'll lose all or any data? Would I be better off unplugging Spot and hosting my domains somewhere?

Thanks for your help,
Zora

iocain 12-25-2002 12:11 PM

I'd say it entirely depends how willing you are to learn how to administrate the Linux box. Once you get used to the Unix-like approach to things, I think you'll see why so many of us appreciate it. Unless your sites get a lot of traffic, hosting them on your existing high-speed connection is a much cheaper way to go than paying a hosting provider.

It should be pretty apparent which things could damage your data: Don't let anything re-write your partition tables; don't let anything delete files. Just find a way to get in and blank the passwd field for root in /etc/shadow. Then set a new password for root with the 'passwd' command.

The line in /etc/shadow you need to change will look something like this:

root:$1$gmbyRbTU$SR.9MaRs6Mhj2NSDrHVpm.:11596:0:99999:7:::

Where you need to delete the '$1$gmbyRbTU$SR.9MaRs6Mhj2NSDrHVpm.' part (which is and md5 hash, but yours may use des, and will be a different string in any case), so it winds up looking like:

root::11596:0:99999:7:::

Which means root has no password. Then run 'shutdown -r now' to reboot, and you can log in as root to run 'passwd' and set a new password and fix whatever else is wrong.

Sympathies too, by the way!

magyartoth 12-26-2002 08:54 AM

I use Redhat linux, and whenever I forget the root password, I just login in single user mode and change it that way. Very easy to do if you have physical access to the machine.

Just do a search on here or google for 'lost root password linux' or 'single user mode linux' and you should find more answers.

M

ElZora 12-26-2002 01:47 PM

I tried all of this, and I still can't get in, lol.

I think my best route is going to be starting from scratch and building up everything.

My dad was a computer pro and did his best to lock me out of the server... he certainly succeeded.

Thank you all for your help!


All times are GMT -5. The time now is 11:04 AM.