FSCK failed error after resetting root password - help please, major problem !
SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
FSCK failed error after resetting root password - help please, major problem !
All, any help would be hugely appreciated. We have a server for which the root password had been lost, and there were no other user accounts set up. Yesterday evening I attempted to reset the root password by booting from the install CD and using VI to clear the root password in the passwd and shadow files. I then rebooted, and the system has halted with an 'FSCK failed. Please repair manually and reboot' error, with a prompt to 'Enter root password' below. But of course the root password isn't known (I had expected it to blank after editing the passwd and shadow files, but it doesn't work), so I have no way of logging on. Does anybody know why this has happened, and if there is a way of fixing this ? It's a pretty major problem so any help would be really appreciated.
First of all, manually editing /etc/passwd and /etc/shadow is bad, m'kay? You should have either: 1. booted in single user mode -> change password 2. used the livecd to mount -> chroot -> change password.
OK, so thats bad. How bad exactly ? Unrecoverable bad, (I really hope not, rebuilding the server would be a disaster), or recoverable but difficult ? Thanks
(I did try booting from the CD in Repair mode, logged on as root then ran the command #passwd root, but got an error: 'User not known to the underlying authentication mode')
OK, have now spent literally days on this and getting nowhere.
First of all I tried the simple instructions and found that once I add single init=/bin/bash to the end of the kernel line at boot, when it loads to the bash prompt the keyboard does not respond at all (perhaps because this is a Blade server so maybe the drivers haven't loaded at this stage ?)
So I tried loading from the rescue CD, and following much painful trial and error I found the 'official' Novell password reset seemed to get me closest to the solution - How To: Recover the Linux root password - but (incredibly frustrating) when I follow the instructions and get to the #passwd root step it comes back:
bash: passwd: command not found
I've also tried editing the fstab file to stop fsck from running at boot by changing the last digits for /dev/sda1 and /dev/sda2 to 0, and the edit has worked, but the server still fails at the same point.
You want to change back the changes made to the fstab file.
If a partition isn't used for a system directory, and causes problem enabling booting, you can comment it out for now by prepending an octothorpe character `#' to the beginning of the line.
I once was in a similar situation just after updating my desktop with newer SuSE version. I tried zeroing out the root password, and wasn't able to log in anyway. ( Maybe because of the way PAM was configured. ) So I copied the /etc/shadow hash entry for my regular user & used it temporarily for logging in as root. The characters between the first two dollar signs of the password hash indicate the encryption used. You should have support for both md5 and bluetooth, so using a regular user's entry from a system that uses either should work.
Your message about the passwd program being missing seems to indicate that /bin/ & /usr/bin are missing as well, probably due to your /etc/fstab changes, or because you chroot'ed to the wrong directory.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.