How to open my Linux because it asks me a password ?

Linux
toni asked:


I made a mess with my Linux and now it asks me a password at start-up which I don’t know. Is there any method to regain my Linux ?

Everything Linux

There Are 2 Responses So Far. »

  1. I only know how it can be done on Ubuntu and unless you are very careful you can completely mess things up. Here is the process but I hold no responsibility for the outcome.

    1. Turn your computer on.
    2. Press ESC at the grub prompt.
    3. Press e for edit.
    4. Highlight the line that begins kernel ………, press e
    5. Go to the very end of the line, add rw init=/bin/bash
    6. press enter, then press b to boot your system.
    7. Your system will boot up to a passwordless root shell.
    CAUTION: This is a FULL ROOT SHELL! You can damage your system if not careful!
    8. Type in passwd . Set your password.
    9. Type in reboot.

    This method I have used in the past from directions found here It by no means works every time so you are skating on thin ice.

    Ideally if you have a spare Hard Drive carry out a basic installation of Ubuntu and copy all of your data across before you begin.

    LUg.

  2. Welp, yes, it’s a bit trixy, but it WILL work.
    Do NOT |#u(K this up though.

    Go ahead a boot up a live CD, it should mount your hard disk, so you can see files in it. I believe with an Ubuntu live it will be mounted /media/hda but look around, you’ll find it.

    anyway once you find your drive, you can directly edit the the /etc/passwd file.

    Now, you need to understand what it is you are editing, and what to do, because if you pooch it… well, it’s pooched then isn’t it?

    You are going to replace the x in the line that corresponds to your username, with a new password. The x stands for “use an encrypted password from /etc/shadow” we are going to tell the computer to use a non encrypted password. So open up a terminal, and hit it with;
    sudo nano /media/hdb/etc/passwd
    (path might be different depending on how the HDD mounted)

    find the line about your username. It’ll look like this:

    elizabeth:x:1000:1000:
    elizabeth,,,:/home/elizabeth:
    /bin/bash

    That will all be on one line but Y!A has issues…
    what you want to do is replace the first x with a short easy to remember password, (at least 6 letters though) and change NOTHING ELSE about the file.

    elizabeth:mypass:1000:1000:
    elizabeth,,,:/home/elizabeth
    /bin/bash

    we changed the x to mypass.

    now save the file: (ctrl +x, Yes, Enter)

    and reboot the machine. (not to the live CD)
    you should be able to get in now with your user name, and the password you changed to.

    Once you are in, you should really
    sudo su yourself, and change the password back to an x
    in /etc/passwd
    then while still in su issue the command :
    passwd myusername
    (obviously replace this with your real user name)

    and enter a new password twice.
    Now you are back to being encrypted, AND you know your password. YAY!

Post a Response

You must be logged in to post a comment.