On Fedora, root is coming up invalid. WHat is solution?
|
migrated from stackoverflow.com Jun 24 '10 at 11:17
|
If it were a simple "password lost" issue, I'd follow the other advice. Seeing as it was a hack, the solution would be wipe and restore from known good backup. You'll never know if you fully cleaned it and eliminated rootkits and backdoors. |
|||||||||||||
|
|
First of all, shut it down until you figure out what to do. There's nothing more annoying for a hacker that the server he just hacked is now down! |
|||||
|
|
Nothing that we can do. If you have bare-metal access (or access to somebody that does), you should be able to boot into single user mode (aka rescue mode) as root and then reset the root password. Needless to say, you need to limit internet access to this until you've fixed everything. I've seen a few people saying restore to a backup is the only way to get clean. Restoring a backup isn't the whole solution. That gets your attacker back outside and stops your machine doing anything evil on their behalf. The main problem after an attack is there's still a vector into your machine. Before you nuke your old install, grab the logs, databases, web files, etc. If it's a recent backup, |
||||
|
|
If it is possible to boot from a medium such as USB or CD, download and run a LiveCD. Then you can make a new password for the machine by chrooting into it and issuing passwd root afterwards to give the root user a new password. Though I would be very causious about what files and other stuff you back up. Preferably you should reinstall the machine and on the new install you should rethink your security on the server and make it tougher for the people to just hack it. |
|||
|
|
|
You will need physical access, at your boot prompt pass "init=/bin/sh" then mount the filesystems you need (/ for sure needs to be remounted readwrite) and change the password back. Once that's done, reboot. Now you should be aware that you may not have access to the system back, considering you suspect the machine was compromised, you have other work you need to do to ensure that your system is sane. Try and identify when it was breached, and assume everything after that point has been tempered with, go back to a known secure point in time and restore those backups. |
|||
|
|
|
Solution is load LiveCD system on this machine for read/write disk mount and change configuration on system (eg. /etc/passwd and /etc/shadow) for allow root user logon on this system and set for her password or get his hard-drive on other machine. |
|||||
|
|
Boot from a different OS (LiveCD, USB, etc. - anything that was not connected to the machine previously). Save your documents, sources and anything else that is not an executable binary. Format the machine and install everything from scratch. Once a machine has been compromised, you can't clean it up. The bad guy owns it; your only solution is to wipe it up. |
|||
|
|