As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/

Linux fsck, reboots and unknown pw

bloodatonementbloodatonement Registered User regular
edited May 2008 in Help / Advice Forum
So our IT guy is out of town and probably allegedly out of cell range. Linux box got rebooted but there are some file errors and it says that fsck needs to be manually. Problem is, he didn't leave the password so we can't log in to maintainance mode. and if I ctr-d to do a normal boot, it says some stuff about drives not beeing mounted and then reboots. Any tricks to get this bad boy up and running?

Zdy0pmg.jpg
Steam ID: Good Life
bloodatonement on

Posts

  • bowenbowen How you doin'? Registered User regular
    edited May 2008
    So our IT guy is out of town and probably allegedly out of cell range. Linux box got rebooted but there are some file errors and it says that fsck needs to be manually. Problem is, he didn't leave the password so we can't log in to maintainance mode. and if I ctr-d to do a normal boot, it says some stuff about drives not beeing mounted and then reboots. Any tricks to get this bad boy up and running?

    When it complains about fsck, is it at a login prompt? I've had CTRL+D reboot me when I'm at the login prompt.

    bowen on
    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • SeydlitzSeydlitz Registered User regular
    edited May 2008
    It would help if you post the error messages.

    Assuming you've got physical access to the box, boot into single user mode and reset it from there? Either that or burn a knoppix CD, mount the hard drive with /etc/shadow on it and reset the password from there.

    Either of these should work.

    Seydlitz on
    [SIGPIC][/SIGPIC]
  • bloodatonementbloodatonement Registered User regular
    edited May 2008
    bowen wrote: »
    When it complains about fsck, is it at a login prompt? I've had CTRL+D reboot me when I'm at the login prompt.

    Kinda, it says to run fsck in manual mode, then it prompts for the pw to go into maintainance mode, or ctrl-d to do a normal boot.
    Seydlitz wrote: »
    It would help if you post the error messages.

    Assuming you've got physical access to the box, boot into single user mode and reset it from there? Either that or burn a knoppix CD, mount the hard drive with /etc/shadow on it and reset the password from there.

    Either of these should work.

    Yeah, I'm downloading a live cd now

    bloodatonement on
    Zdy0pmg.jpg
    Steam ID: Good Life
  • bloodatonementbloodatonement Registered User regular
    edited May 2008
    Ok so I booted into knoppix. Um, what do I do after that to run the fsck?

    bloodatonement on
    Zdy0pmg.jpg
    Steam ID: Good Life
  • bowenbowen How you doin'? Registered User regular
    edited May 2008
    You'll have run fsck against the device that was having problems.

    http://en.wikipedia.org/wiki/Fsck or go ahead and type "man fsck" in a terminal window.

    bowen on
    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • SeydlitzSeydlitz Registered User regular
    edited May 2008
    Assuming your root drive with /etc/shadow on it is /dev/hda1

    Boot into knoppix (at the boot prompt, knoppix lang=us)
    Make a new directory in which to mount your filesystem (mkdir temp)
    Mount your hard drive (mount /dev/hda1 temp)
    Change to the hard-drives /etc/ directory (cd temp/etc)
    open it for editing (vi shadow)
    Find the root (Edit: assuming maintence = root, if not find the 'maintenance' entry)
    It will look something like root:dsfDSTG!s:12581:0:99999:7:::
    Delete everything between the first and second colons (bolded for don't mess this set up)
    So then it will look like root::12581:0:99999:7::: (only the bits between the first and second colons matter, for goodness sake don't change anything else)
    Save & exit (:wq in vi)
    Change to home directory (cd ~)
    Unmount the hard drive (umount temp)
    reboot, and remove the knoppix cd from the drive.

    Your root account now has no password (this probably needs changing)

    You've given no indication of how much you know about what you're doing so I've guessed at a low knowledge level, do any steps need explaining?

    Seydlitz on
    [SIGPIC][/SIGPIC]
  • bloodatonementbloodatonement Registered User regular
    edited May 2008
    Thanks for all the help. Puppy Linux and a fsck did the trick.

    That pw reset looks way too scary, glad I didn't need to use it.

    bloodatonement on
    Zdy0pmg.jpg
    Steam ID: Good Life
  • SeydlitzSeydlitz Registered User regular
    edited May 2008
    Ah, excellent. It's not that bad really, just need to double-check you've got the right number of :'s at the end of editing the file.

    Consider this a timely reminder to document root passwords! (probably in a safe somewhere if it's an important system) :)

    Seydlitz on
    [SIGPIC][/SIGPIC]
Sign In or Register to comment.