Lost password for ubuntu.   How hard is it to get back in ?

Posted on 2006-04-20
Last Modified: 2013-11-15
Lost password for ubuntu.   How hard is it to get back in ?   I have access to reboot the PC.  
Question by:bitmechanic
    LVL 15

    Expert Comment

    Reboot the PC, when you get to grub press 'a' to add parameters to the kernel. Add a space and 1

    It's going to but to single-user mode with root logged in and you reset root pw with passwd.
    LVL 1

    Expert Comment

    1)reboot with install cd (or live ch or whatever)
    2)choose keyboard (stop there)
    3)switch to tty 2 (or 3, the one which say press enter to get shell)
    4) mount root partition ('/') if you don(t know the root partition use fdisk or so)
    5) chroot to the mountpoint
    6) issue passwd command
    7) sit back and reboot

    LVL 22

    Accepted Solution

    1.   Boot with knoppix live CD.
    2.   Mount / partition.
    3.   Edit /etc/shadow directly to clear password:
    The line:


    needs to become:


    and now root has no password. Just 'passwd' to create one:)


    LVL 22

    Expert Comment

    That wasn't very well explained!

    Once you have edited the file, then root has no password. Reboot the system, and login as root (with no password), then 'passwd' to create your new password.

    LVL 7

    Expert Comment

    pjedmond's procedure will work perfectly to reset the password

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
    In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now