Skip to content
Unfettered
Menu
  • Catagories
    • Personal
    • Psycho-Spiritual
    • Social Justlic/Civics
      • 504 (U of M SSW)
    • Fitness/Health
    • Tech
  • Recipes
  • Poetry
  • Code
  • Donation
  • About Me
Menu

“OMG! Help!” or “How to Regain Access to Your Ubuntu Computer Once You Have Lost Your User Name and Password!”

Posted on October 29, 2008August 8, 2016 by Josh

So, have you ever lost a password? Ever forgot your user name after coming up with something pretty nifty that is so unique you could never possibly forget it? Ever bought a used computer off Craigslist with Ubuntu installed and forgot to ask the user name and password? Yeah, well rather than going through the headache of reinstalling the entire operating system and loosing all of your data, here is an easy 3 step procedure you can use for Ubuntu password recovery!

Step One. Gain root access.

This step can be used to gain root access to any computer running Ubuntu that you have physical access to.

1. Power up the computer, and watch it load the BIOS
2. When it says “grub loading…” hit the “esc” button to get into the “grub menu”.
3. hit the “e” button to go into edit mode.
4. Highlight the line that begins “Ubuntu, KERNEL…….” and hit “e” for edit again.
5. At the end of this line add

rw init=/bin/bash

and then press “enter”.
6. Press “b” for boot.
7. You will boot into a “root shell”. This means you have administrative powers in the system now. You should see something like this

root@some-computer:~$

and nothing else.

Step Two. Recover the user name.

This is pretty straight forward. All you need to do is enter in the following code and press enter.

grep x:1000 /etc/passwd | cut -d: -f1

make sure you do it exactly as you see here, it is case sensitive. This should give you the name, let’s say it gave you the name bob…write it down this time.

Step Three. Reset the Password

Again, this is pretty straight forward. Just enter in

 passwd bob

and press enter. Make sure you replace “bob” with whatever you got as a response in step 2. It will ask you for a new password, and then ask you to enter it in again to confirm. Now you have reset the password for the user name you received in Step Two. Congrats, you have the user name and password. Now you can reboot, and log in as normal.

1 thought on ““OMG! Help!” or “How to Regain Access to Your Ubuntu Computer Once You Have Lost Your User Name and Password!””

  1. computer support says:
    December 21, 2009 at 10:58 am

    you saved me…this article has saved me n my computer!!

    Reply

Leave a ReplyCancel reply

RSS muBlog

  • Of interest... - MAPS PBC Announces New American Medical Association CPT...

RSS News Josh finds interesting

  • MAPS PBC Announces New American Medical Association CPT III Codes for Psychedelic-Assisted Therapies Take Effect
  • Combining DMT with SSRIs Bolsters DMT’s Efficacy in Treating Severe Depression
  • MDMA Successfully Treats PTSD in Another Phase 3 Trial Sponsored by MAPS
  • The 'gnarly and painful' therapeutic potential of 'magic mushrooms'

RSS Books I’ve read

  • Program Evaluation: An Introduction by David Royse
  • Insane Consequences: How the Mental Health Industry Fails the Mentally Ill by D.J. Jaffe
  • From Asylum to Community: Mental Health Policy in Modern America by Gerald N. Grob
  • Adult Psychopathology and Diagnosis by Deborah C. Beidel
  • Drinking: A Love Story by Caroline Knapp

Creative Commons License
This website and all works in it by Joshua Paul Panter are licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.

Subscribe

RSS feed RSS - Posts

RSS feed RSS - Comments

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 73 other subscribers
© 2025 Unfettered | Powered by Minimalist Blog WordPress Theme