特殊:Badtitle/NS100:LostPassword:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Wikibot留言 | 贡献
无编辑摘要
Wikibot留言 | 贡献
无编辑摘要
 
(未显示同一用户的3个中间版本)
第8行: 第8行:
=== The Standard Way ===
=== The Standard Way ===
/!\ This procedure gives you a '''full root shell'''! You can damage your system if you are not careful!
/!\ This procedure gives you a '''full root shell'''! You can damage your system if you are not careful!
# When booting up press '''ESC''' at the grub prompt and use the arrow keys to select the rescue mode option and press '''enter'''.
<ol><li>When booting up press '''ESC''' at the grub prompt and use the arrow keys to select the rescue mode option and press '''enter'''. (Some newer installations may hide the grub menu at boot, if this is the case, hold shift to get to the grub menu)
2. This will boot the system in rescue mode and you should arrive at a prompt that looks like this
</li><li>This will boot the system in rescue mode and you should arrive at a prompt that looks like this</li></ol>
 
<pre><nowiki>
<pre><nowiki>
root@something
root@something
</nowiki></pre>
</nowiki></pre>
3. To reset your password type this in  
<ol><li>To reset your password type this in</li></ol>
 
<pre><nowiki>
<pre><nowiki>
passwd <username>
passwd <username>
</nowiki></pre>
    </nowiki></pre>
and then enter you new password.
and then enter you new password.
4. Once you are done resetting your password you  can than switch back to the normal GUI mode by putting this in
<ol><li>Once you are done resetting your password you  can than switch back to the normal GUI mode by putting this in</li></ol>
 
<pre><nowiki>
<pre><nowiki>
init 2
init 2
</nowiki></pre>  
  </nowiki></pre>  
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 '''ESC''' at the grub prompt.
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'''
 
----
----
[[category:CategorySecurity]]  
[[category:CategorySecurity]]  


[[category:UbuntuHelp]]
[[category:UbuntuHelp]]

2010年5月19日 (三) 23:11的最新版本

{{#ifexist: :LostPassword/zh | | {{#ifexist: LostPassword/zh | | {{#ifeq: {{#titleparts:LostPassword|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:LostPassword|1|-1|}} | zh | | }}

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. /!\ 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

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

  1. When booting up press ESC at the grub prompt and use the arrow keys to select the rescue mode option and press enter. (Some newer installations may hide the grub menu at boot, if this is the case, hold shift to get to the grub menu)
  2. This will boot the system in rescue mode and you should arrive at a prompt that looks like this
root@something
  1. To reset your password type this in
passwd <username>
    

and then enter you new password.

  1. 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 ESC at the grub prompt. 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