Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: [URGENT!] Maintenance shell wants root password

  1. #1
    Join Date
    Dec 2008
    Beans
    10

    Exclamation [URGENT!] Maintenance shell wants root password

    This post is now resolved.

    A massive thank you to everyone who posted to help me, I really appreciate it.


    Just that. I restarted my PC and it decided to force a disk check - or some sort of linux equivalent which I haven't seen before.

    Apparently I have bad blocks. 7 of them, no less. Hardcore, right?

    Anyway, the options available were to enter a root password so I could load up a maintenance shell and perform system checks and things, or to hit Ctrl+D to reset the system.

    Incidentally, this process occurs if I load the normal OS or recovery mode.

    Now, I don't remember my root password. I was pretty drunk when I set it up, which frankly opens up the possible range to a whole load of stupid sh*t. There doesn't seem to be any way to grab a command line to reset it though, as the only options I get are enter password or ctrl+d.

    I tried the command line from the OS selection screen, but keep getting something like "error 32, needs to be authenticated" (I'm typing this from memory, please forgive any errors.)

    If anyone can help without me having to reinstall the OS and lose several hundred GBs worth of data, I'd love you forever and bake you a pie.

    EDIT: I've read the other entries on the forum to do with this kind of thing, but most assume that (a) you have a CD drive and (b) you can still access some aspect of Ubuntu - terminal or some sort of CLI to perform repairs. I can't, as far as I know.

    EDIT 2: The error I get is similar to, <b>but not exactly</b>, this:

    UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
    (i.e., without -a or -p options)
    fsck died with exit status 4
    Checking drive /dev/sdb1: 93% (stage 4/5, 395/611)

    * An automatic file system check (fsck) of the root filesystem failed.
    A manual fsck must be performed, then the system restarted.
    The fsck should be performed in maintenance mode with the root filesystem mounted in read only mode.
    *
    a maintenance shell will now be started.
    After performing system maintenance, press CONTROL-D
    to terminate the maintenance shell and restart the system.
    Give root password for maintenance shell and restart the system.
    Dive root password for maintenance(or type Control-D to continue):
    Last edited by SamG22; February 9th, 2009 at 06:19 PM. Reason: Added info

  2. #2
    Join Date
    Mar 2008
    Location
    England
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: [URGENT!] Maintenance shell wants root password

    Quote Originally Posted by SamG22 View Post
    Just that. I restarted my PC and it decided to force a disk check - or some sort of linux equivalent which I haven't seen before.

    Apparently I have bad blocks. 7 of them, no less. Hardcore, right?

    Anyway, the options available were to enter a root password so I could load up a maintenance shell and perform system checks and things, or to hit Ctrl+D to reset the system.

    Incidentally, this process occurs if I load the normal OS or recovery mode.

    Now, I don't remember my root password. I was pretty drunk when I set it up, which frankly opens up the possible range to a whole load of stupid sh*t. There doesn't seem to be any way to grab a command line to reset it though, as the only options I get are enter password or ctrl+d.

    I tried the command line from the OS selection screen, but keep getting something like "error 32, needs to be authenticated" (I'm typing this from memory, please forgive any errors.)

    If anyone can help without me having to reinstall the OS and lose several hundred GBs worth of data, I'd love you forever and bake you a pie.

    EDIT: I've read the other entries on the forum to do with this kind of thing, but most assume that (a) you have a CD drive and (b) you can still access some aspect of Ubuntu - terminal or some sort of CLI to perform repairs. I can't, as far as I know.
    I think it means "Enter A root password", since recovery mode is for exactly the kind of situations when you can't get into the PC any other way. This new root password is so you can perform maintenance as root, so I think it can be anything...

  3. #3
    Join Date
    Dec 2008
    Beans
    10

    Re: [URGENT!] Maintenance shell wants root password

    Quote Originally Posted by KeyserSoze93 View Post
    I think it means "Enter A root password", since recovery mode is for exactly the kind of situations when you can't get into the PC any other way. This new root password is so you can perform maintenance as root, so I think it can be anything...
    Afraid not...I tried a variety of things and it rejected them all...I think if had been asking for a new pwd it would have accepted the first thing I put in.

    Thanks very much for your input though - this the third or fourth post I've made on these forums and the first to get a response!

  4. #4
    Join Date
    Sep 2005
    Beans
    119
    Distro
    Xubuntu 11.10 Oneiric Ocelot

    Re: [URGENT!] Maintenance shell wants root password

    Do you get the grub menu ? (press esc on boot).
    Did you set the actual root password before or just used sudo with your own password?

  5. #5
    Join Date
    Dec 2008
    Beans
    10

    Re: [URGENT!] Maintenance shell wants root password

    Quote Originally Posted by neur0 View Post
    Do you get the grub menu ? (press esc on boot).
    Did you set the actual root password before or just used sudo with your own password?
    I'm almost certain I set the root password as something, but whenever I used the CLI I always did sudo <mypassword>.

    The GRUB menu, if it's what I think it is, loads automatically on boot as I have an emergency 15GB windows XP partition, and it gives me the choice of where to boot to.

    Thanks for your reply as well Any suggestions?

  6. #6
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,480
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: [URGENT!] Maintenance shell wants root password

    In the GRUB menu, select your Ubuntu recovery mode line but don't press Enter. Press e, and then go down to the kernel parameters and press e again. This enables you to edit the options that get passed to the kernel when it boots.

    You see a parameter there that starts with init= ? As in, it has "init=" and then a filepath. Change the filepath to /bin/sh. When the kernel starts, it will immediately go to a root shell instead of booting up the distribution. You might need to manually mount your hard disk read-write, but after that you should be able to use the "passwd" command to change your root password to something you will remember
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

  7. #7
    Join Date
    Dec 2008
    Beans
    10

    Re: [URGENT!] Maintenance shell wants root password

    Quote Originally Posted by 3rdalbum View Post
    In the GRUB menu, select your Ubuntu recovery mode line but don't press Enter. Press e, and then go down to the kernel parameters and press e again. This enables you to edit the options that get passed to the kernel when it boots.

    You see a parameter there that starts with init= ? As in, it has "init=" and then a filepath. Change the filepath to /bin/sh. When the kernel starts, it will immediately go to a root shell instead of booting up the distribution. You might need to manually mount your hard disk read-write, but after that you should be able to use the "passwd" command to change your root password to something you will remember
    That sounds PERFECT, and you sir would happily be the recipient of some tasty cake. However, being the useless moron I am it doesn't seem to be working. A series of screenshots are attached below to show the various options I'm taking and their results:

    (Also bear in mind I'm trying to replicate this on the Ubuntu VM I have running here at work, but the distro and build running on both my test VM, which is working okay otherwise, and the netbook I have at home which is borked, is identical I believe.)

    Starting with:



    I push e and move down to:



    Which has an intial value of:



    Which I then change to:



    And on pushing esc from that screen and then b to boot, am faced with:



    ----

    Could you possibly shed some light on what I'm doing wrong? Thanks so much.

  8. #8
    Join Date
    Sep 2005
    Beans
    119
    Distro
    Xubuntu 11.10 Oneiric Ocelot

    Re: [URGENT!] Maintenance shell wants root password

    Actually, he said
    Code:
    ... go down to the kernel parameters ...
    you went to initrd
    And just edit the line , don't erase other parameters.
    And it should probably be init=/bin/bash not init=/bin/sh
    Last edited by neur0; February 6th, 2009 at 12:26 PM.

  9. #9
    Join Date
    Dec 2008
    Beans
    10

    Re: [URGENT!] Maintenance shell wants root password

    Quote Originally Posted by neur0 View Post
    Actually, he said
    Code:
    ... go down to the kernel parameters ...
    you went to initrd
    And just edit the line , don't erase other parameters.
    And it should probably be init=/bin/bash not init=/bin/sh
    Thanks for your reply. There was no text apart from in the line I chose that has the text "init". The second line I tried appending init=bin/sh, or bin/bash, and then the third line just in case, but neither had the effect they were supposed to.

  10. #10
    Join Date
    Jul 2008
    Location
    Netherlands
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: [URGENT!] Maintenance shell wants root password

    Quote Originally Posted by SamG22 View Post
    Just that. I restarted my PC and it decided to force a disk check
    Can you please boot from the Ubuntu installation cdrom, and use the "live session", then post the output of :
    Code:
    sudo fdisk -l
    and do a manual file system check on your Linux partitions, like :
    Code:
    sudo fsck /dev/sdb1

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •