xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

How to reset your password in Ubuntu x64!

How to reset your password in Ubuntu x64!

https://help.ubuntu.com/community/LostPassword#The_Standard_Way

 

 


Lost Password?

Sometimes it is necessary to get root access, for example when you have forgotten your password or changed something in /etc/sudoers and things do not work as expected. 

Warning /!\ Be careful, because this step will give you full root access to your system and you can really damage your system! Keep in mind that all the steps you see here can also be done by someone else!

Now let us start with a way that should work on any freshly installed Ubuntu system:

The Standard Way

Warning /!\ This procedure gives you a full root shell! You can damage your system if you are not careful!

  1. When booting up press SHIFT (in systems 9.10 "karmic" or later) or ESC (in systems 9.04 "jaunty" or earlier) at the grub prompt and use the arrow keys to select the rescue mode option and press enter.

  2. The file system may be read only (it is in all currently supported releases). Remount as read write
    • mount -rw -o remount /
  3. This will boot the system in rescue mode and you should arrive at a prompt that looks like this
    • root@something
  4. To reset your password type this in 
    • passwd <username>
      Press return, then you will be prompted to enter and confirm a new password.
  5. Once you are done resetting your password you can than switch back to the normal GUI mode by putting this in 
    • init 2

If if appears to boot normally, but you see a message that says:

  • Give root password for maintenance (or type Control-D to continue):

then you will have to try a different trick below. 

The Other Way

If the "Standard Way" does not work for you and you recieve the "Give root password for maintenance" message, you can recover your password using the following steps

1. Reboot your computer

2. Press SHIFT or ESC at the grub prompt (as earlier).

3. Select your image.

4. Highlight the line that begins kernel and press 'e' to edit

5. Go to the very end of the line, change the ro to rw and add init=/bin/bash

press enter, then press b to boot your system.

Your system will boot up to a passwordless root shell.

6. Type in passwd username

7. Set your password.

8. Type in reboot

The Other Way Lucid

At least for 'Lucid' I found out that the steps 1-5 in the procedure mentioned above are slightly different:

1. Reboot your computer

2. Hold shift during boot to start GRUB menu

3. Highlight your image and press 'e' to edit

4. Find the line starting with linux and append init=/bin/bash at the end of that line

5. Press ctrl-x to boot.

Then follow the steps 6-8 as mentioned above.


CategorySecurity 

LostPassword (2014-04-11 09:08:07由warren-hill编辑)

 

2.

http://www.psychocats.net/ubuntu/resetpassword

How to reset your password in Ubuntu

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

There are many reasons you might want to reset a password:

  • Someone gave you a computer with Ubuntu installed on it but not the password for the user account.
  • You just installed Ubuntu and forgot what password you selected during the installation process.
  • You have too many passwords in your life and can't keep track of them all.

Well, this tutorial will help you reset your Ubuntu user account password, regardless of what reason you have for resetting it.

First, you have to reboot into recovery mode.

If you have a single-boot (Ubuntu is the only operating system on your computer), to get the boot menu to show, you have to hold down the Shift key during bootup.

If you have a dual-boot (Ubuntu is installed next to Windows, another Linux operating system, or Mac OS X; and you choose at boot time which operating system to boot into), the boot menu should appear without the need to hold down the Shift key.

 


From the boot menu, select recovery mode, which is usually the second boot option.


After you select recovery mode and wait for all the boot-up processes to finish, you'll be presented with a few options. In this case, you want the Drop to root shell prompt option so press the Down arrow to get to that option, and then press Enter to select it.

The root account is the ultimate administrator and can do anything to the Ubuntu installation (including erase it), so please be careful with what commands you enter in the root terminal.

In recent versions of Ubuntu, the filesystem is mounted as read-only, so you need to enter the follow command to get it to remount as read-write, which will allow you to make changes:

mount -o rw,remount /


If you have forgotten your username as well, type

ls /home

That's a lowercase L, by the way, not a capital i, in ls. You should then see a list of the users on your Ubuntu installation. In this case, I'm going to reset Susan Brownmiller's password.

To reset the password, type

passwd username

where username is the username you want to reset. In this case, I want to reset Susan's password, so I type

passwd susan

You'll then be prompted for a new password. When you type the password you will get no visual response acknowledging your typing. Your password is still being accepted. Just type the password and hit Enter when you're done. You'll be prompted to retype the password. Do so and hit Enter again.

Now the password should be reset. Type

exit

to return to the recovery menu.

 


After you get back to the recovery menu, select resume normal boot, and use Ubuntu as you normally would—only this time, you actually know the password!

Note:
Some people get freaked out about having recovery mode logging you in as root. For more information, read Recovery mode makes me root user. Isn't that a security risk?

Last updated 04/29/12 11:34

refs



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2016-03-26 12:27  xgqfrms  阅读(18)  评论(0编辑  收藏  举报