LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 06-09-2009, 02:47 AM   #1
mjwraw
LQ Newbie
 
Registered: Apr 2009
Posts: 14

Rep: Reputation: 0
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.
 
Old 06-09-2009, 03:34 AM   #2
noctilucent
Member
 
Registered: Jun 2009
Distribution: slackware
Posts: 123

Rep: Reputation: 34
Hello.

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.
 
Old 06-09-2009, 04:04 AM   #3
mjwraw
LQ Newbie
 
Registered: Apr 2009
Posts: 14

Original Poster
Rep: Reputation: 0
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')

Last edited by mjwraw; 06-09-2009 at 04:07 AM.
 
Old 06-09-2009, 04:24 AM   #4
Marko Hyvärinen
LQ Newbie
 
Registered: May 2009
Posts: 24

Rep: Reputation: 15
http://digitalpbk.blogspot.com/2009/...ra-debian.html
http://www.linuxforums.org/security/..._password.html
google -> linux reset root password

if any of those won't work, there is some "situation" on going...

Marko
 
Old 06-09-2009, 06:24 AM   #5
mjwraw
LQ Newbie
 
Registered: Apr 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks Marko, I'll give these a try and let you know how I get on
 
Old 06-17-2009, 06:33 AM   #6
mjwraw
LQ Newbie
 
Registered: Apr 2009
Posts: 14

Original Poster
Rep: Reputation: 0
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.

Is this hopeless ?
 
Old 06-19-2009, 01:19 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.

Last edited by jschiwal; 06-19-2009 at 01:21 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
difficulties in resetting root password anarchic_birdsong Linux - General 20 09-12-2008 01:14 AM
resetting th root password on rh9 hamza11050 Linux - Software 4 09-30-2004 07:21 PM
Resetting Root password lorddecker Linux - Software 4 06-18-2004 02:48 PM
Resetting MySQL root password b200306 Linux - Software 3 02-08-2004 03:21 PM
resetting root password. Reaps^ Linux - Security 1 07-06-2003 03:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 10:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration