Watching The Net • Computer - Internet - Technology Tips And Tutorials
Latest Articles Submit Tip-Article or Question Advertise On WTN
 

Ubuntu Guide For Windows Users: Reset Your Password When You Have Forgotten It

17

ubuntulogo.jpgFor Windows users, several solutions exist if you have forgotten your password such as creating a password reset disk.

But how about if you are on an unfamiliar system such as Ubuntu (or any Linux distribution) and you forgot your password. Do you know what steps to take to reset your password so you can log back in to your computer?

Unlike Windows, this process is a lot easier.

To get started, just boot your computer and when you see "Loading Grub" press the ESC (Escape) key. If you missed it, just reboot and try again.

Once you see the Grub prompt, press 'e' to enter Edit mode (as shown by the arow in below screen shot).

ubunturesetpwd1.png

Next, highlight the line that begins with kernel and press 'e'.

ubunturesetpwd2.png

Now, what you see may seem a little odd, but go the very end of the line, hit the space bar once, then type the following command after the word 'splash':

rw init=/bin/bash

ubunturesetpwd3.png

and press enter, then b to reboot.

After Ubuntu has restarted, instead of loading the GUI, you will see a passwordless root shell. At the prompt, type the following command and replace 'username' with the name of the account you want to change the password.

passwd username

ubunturesetpwd4.png

Type in a new password and retype to verify, once you see the confirmation that your password was updated successfully, reboot.

When GNOME loads enter your new password and you should be good as new again.

Filed under Ubuntu And Linux Tips by Watching The Net #

Related Posts

  • Why Web Sites Security Questions Can Be Bad News
  • Linux Tip: Tighten Up Security And Disable SSH Login For Root Account
  • How To Configure Automatic Updates Schedule In Ubuntu
  • Restore Panels In Ubuntu Back To Their Default Settings
  • Ubuntu Guide For Windows Users: How To Play MP3 Audio Files

What Next?

  • Join The WTN Tips Newsletter
  • Leave a comment
  • Subscribe to Watching The Net
  • Bookmark and Share
  • Comments on Ubuntu Guide For Windows Users: Reset Your Password When You Have Forgotten It Leave a Comment

    May 19, 2008
    Reply

    Silver @ 11:06 am #

    I am not sure why this is considered easier than Windows, but that is a typical comment to make.

    Anyway, what if you have ab encrypted rootfs or use SELinux?

    Reply

    Watching The Net @ 6:06 pm #

    @Silver

    With Windows, if you don't have another account (with rights to change user account passwords)you either need to create a password reset disk or use a third party utility just to change your password (when you have forgotten it).

    Compare that to Linux, the above method is much easier.

    As for ab encrypted rootfs or SELinux, I'll need to do some digging if the method can be used.

    May 20, 2008
    Reply

    caveman @ 5:29 pm #

    There's an even easier way: just select the recovery mode option, select "root" (Drop to root shell prompt) and change your password that way. No need to alter any lines or anything of that sort.

    Reply

    Jimmy @ 6:57 pm #

    How can this be secured against? If I won't forget my password and would rather reinstall than leave root access open this easily?

    Reply

    Nick @ 9:28 pm #

    Isn't that what the "recovery mode" option is for? I haven't used Ubuntu in a while, but on Gentoo that means a root prompt in single user mode. (i.e this)

    And to answer Jimmy, there is no way to stop access to the root prompt on your computer (if you have physical access), but you CAN encrypt the hard disk. Then you have to enter a password to boot up at all. There are many howtos on this, but you only want it if you really care about security.

    May 21, 2008
    Reply

    MTecknology @ 8:56 am #

    WOW!!!

    You guys need some serious help. First of all, yes those will work.

    If you don't want people to edit GRUB in this way, then password protect it. This guide goes over using encrypted passwords, but plain text passwords are also possible. The idea is to protect 1. booting into recovery mode, and 2. editing the configuration file.
    http://www.debiantutorials.org/content/view/40/227/

    I also added a comment in there to explain some things.

    The will pretty securely cover GRUB. BUT, I know of a way around this. You can boot to a live CD and change the systems /etc/shadow file which contains system passwords. You can replace any users password with another hash. But once GRUB is locked down, going through that process would be pretty painstaking since you can no longer just wipe the root password and boot into recovery mode.

    Anyway, how some of that has been cleared up for you.

    Reply

    mngrif @ 1:43 pm #

    No amount of security will help if the attacker has physical access to the machine. There are even ways around drive encryption, especially if the drive is still mounted when the machine is 'attacked'. Boot passwords and BIOS passwords are easily circumvented to even the slightest determination. All you need is a livecd and a screwdriver!

    The above shouldn't ever be used unless you really know what you're doing and won't work for encrypted volumes (in most cases you WILL run in to trouble if you set init to a shell, such as the environment not being set up (thus making vim and other editors useless)). Use the recovery mode to properly boot in to single user mode, as it will run through essential init scripts.

    On most Linux installs, setting init=/bin/sh will boot with / in read only mode too since remounting it is handled by a init script.

    It's called recovery mode for a reason! Use it!

    October 30, 2008
    Reply

    diptimoy @ 8:15 am #

    It did not work. It is showing that command not found.

    November 30, 2008
    Reply

    Dan @ 10:39 am #

    To secure against this:

    1. Disable boot from anything except hard disk in BIOS and password-protect
    2. Make grub password ( http://ubuntuforums.org/showthread.php?t=7353 )

    Sorted.

    December 11, 2008
    Reply

    Debbie @ 6:33 pm #

    hey iam asking for help for a friend, i told him there is a free disk that i can download for him. He has a vista P.C. and has forgotten or someone was playing aroung with his P.C. and changed his password, he needs passwoed to open enternet, so could you please send me an email about disk, i would appercite very much….

    thanking you in addvance Debbie

    Reply

    Watching The Net @ 7:31 pm #

    @Debbie

    I believe your looking for this post –> Reset your Windows Password When You Have Forgotten It.

    July 3, 2009
    Reply

    Daniel @ 6:23 pm #

    Hello all:

    I'm stuck. I forgot my password.

    I "tried" to follow the above procedure, yet, I am unable to "see" grub.

    When linux starts to boot, I press ESC and it still loads.

    Would it be because I'm using Linux Mint and the panel (starting panel when we turn on the computer) is not the same?

    Signe: Eternal Newbee
    Daniel.

    July 26, 2009
    Reply

    1fastbullet @ 7:30 pm #

    @ Eternal Newbee

    Daniel, you must shut the machine down.
    When you reboot (restart) it, the machine goes through it's POST (Power On Self Test) and scrolls through a list of information including things such as the BIOS version, the hard drive and memory the machine sees. Then it will enter the GRUB loading stage. If it does not enter GRUB loading, you would never get to a welcome screen.

    What you need to look for is in the UPPER, LEFT-HAND corner of your screen, after the POST completes. It will say simply "Loading GRUB 1.5" or something to that effect.

    It is while this message is showing in the upper left-hand corner of your screen that you must press the Esc key.

    July 27, 2009
    Reply

    Daniel @ 7:46 pm #

    It worked.

    Thank you, THANK YOU, T H A N K Y O U

    It took me a couple of tries and I got it OK.

    Rolling again.

    Tks so much.

    If I can be of help. Please let me know

    Daniel.

    January 8, 2010
    Reply

    ermaldemi @ 2:38 am #

    @Silver:

    January 9, 2010
    Reply

    daniel @ 10:07 am #

    @Daniel:

    I did get complete satisfaction.

    Tks.

    Daniel.

    February 22, 2010
    Reply

    mario @ 4:49 pm #

    hi all,

    i have a problem here.

    i put a password for the bios of my laptop before a very long time and i didnt use it at all so i forgot it. everytime i format my laptop i just press f12 and it asks me to boot from cd and i do, but i cant enter to the bios setup. i installed the ubunto and i hope that there will be a solution for my problem.
    so the password is only for the bios setup.
    i tried by taking out the battery it didnt work. the motherboard has no jumpers ……
    the laptop is fujitsu siemens s7020. bios is phoenix ver. 1.14
    thanks.

    Leave a Comment

    Click here to cancel reply.

    Fields marked by an asterisk (*) are required.

    Subscribe without commenting

    Build A Home Network
    Get This Free Guide Now
    Home Networking Tips & Advice
    homenetworkingebookS.png
    Enter Your First Name & Email 
    Name:
    Email:
    Feed-icon.jpg
    Subscribe To
    WatchingTheNet.com
    via RSS feed

    Or Get Updates By Email

    Categories

    • Computer How-To
    • Firefox and Internet Explorer Tips
    • Google and Yahoo Tips
    • Internet Technologies
    • Microsoft Office Tips
    • MP3 and Media Players
    • MySpace Tips
    • Ubuntu And Linux Tips
    • VMware Tips
    • Web Master Tips
    • Windows Tips
    • Windows Vista Tips
    • Window 7 Tips

    Check It Out!

    Read Our Most Recent How-To Articles

    Popular How-To Articles

    Record Online Internet Radio Stations On Your PC

    Take The Poll: When Do You Change Your Email Password?

    How To Print A Directory Tree From Windows Explorer

    How to Watch TV Online - A Satellite TV for PC Review

    Windows XP Tip: View Previously Open Folders After Shutdown or Logoff

    Create A Batch File To Open Multiple Programs At Once

    Resource Guide For Installing And Troubleshooting Vista Service Pack 1

    Force Vista To Connect To Wireless Network When SSID Is Not Broadcasting

    Get Detailed Statistics By Running Windows Vista Disk Defragmenter From The Command Prompt

    Ubuntu Guide For Windows Users: Getting Help At The Command Prompt

    Ubuntu Guide For Windows Users: Managing Packages With Synaptic And Aptitude Part 1

    Ubuntu Guide For Windows Users: Managing Packages With Synaptic And Aptitude Part 2

    Firefox Tip: Easily Find Version Information For QuickTime Java And Adobe Flash Player

    Firefox Tip:Save Memory Usage By Disabling Add Ons

    Download And Transfer Music Movies Games From Your PC To Nintendo Wii

    About Watching The Net

    * About Us
    * Contact Us
    * Advertising
    * Privacy Policy

    Getting Started

    * Windows Vista Tips
    * Windows Tips
    * Ubuntu Guide For Windows Users
    * Firefox & Internet Explorer Tips

    Home
    Copyright 2007-2010 Watching The Net. All Rights Reserved.