How to reset a root password
来源:互联网 发布:怎样开启摄像头数据 编辑:程序博客网 时间:2024/05/20 07:52
Origin URL: https://fedoraproject.org/wiki/How_to_reset_a_root_password
Setting up a root password is a mandatory part of a Fedora installation. If you forget or otherwise lose your root password, there are procedures to reset it.
- If you have set a password for your boot loader, refer to this section.
- If you want to reset the boot loader password, refer to these instructions.
- If none of these scenarios apply to you, proceed to the next section.
Fedora uses run levels to determine the services being run when you start your system. Run level 1 can be used as a recovery mode. Booting Linux under run level 1, which is also calledsingle user mode, will display a root prompt on bootup, from which you can reset the root password.
Contents
[hide]- 1Entering Recovery Mode
- 2Changing root password
- 3Reset Password When Boot Loader is Password Protected
- 4Reset Password When BIOS is Password Protected
Entering Recovery Mode
While you system is starting up, hold down the Ctrl key or Esc to see the boot loader menu. After you see the menu:
- Use the arrows to select the boot entry you want to modify.
- Press e to edit the entry.
- Use the arrows to go to kernel line.
- Press a or e to append this entry.
- At the end of the line add the word single or the number 1.
- Press Enter to accept the changes.
- Press b to boot this kernel.
A series of text messages scrolls by and after a short time, a root prompt appears awaiting your commands (#).
Changing root password
As root, changing password does not ask for your old password. Run the command:
# passwd
Enter your new root password twice. Congratulations! You now have now reset your root password. You can type reboot and press enter to restart your system.
Reset Password When Boot Loader is Password Protected
- Boot from the install or rescue CD/DVD.
- Select "Rescue installed system."
- Answer the prompts for language and keyboard. Starting the network is optional and not needed.
- Let the rescue mode mount your file systems in the read/write mode.
- Hit Enter to get the shell prompt.
- At the prompt, enter the following commands. Do not enter any # mark or the text following it. These comments are shown for explanatory purposes only.
chroot /mnt/sysimage # Change to your disk file systempasswd # Change the root passwordexit # Exit the chroot environmentexit # Exit the rescue mode
The system now unmounts the file systems and reboots.
Reset Password When BIOS is Password Protected
If you cannot enter recovery mode because you forgot the BIOS password required to select an alternate boot device, you have three options:
- Refer to your computer's documentation for instructions on resetting the BIOS password in CMOS memory, usually by moving a physical jumper.
- Physically change the boot order.
- Temporarily move the system hard disk to another machine, and follow the procedures above to reset the root password.
- How to reset a root password
- How to Reset the Root Password
- How to Reset the Root Password 5.5
- How to Reset MySQL root Password on CentOS
- How To Reset A Forgotten Raspberry Pi Password
- How to reset "hscroot" password?
- How to reset the root passwd if we forget the root password in red hat
- How to reset the ILOM root password back to the default 'changeme' using ipmitool
- How to Reset Forgotten Root Password in RHEL/CentOS and Fedora
- how to reset sys password in oracle
- How to reset the Verity K2 password.
- How to reset password in ubuntu
- How to reset your password in Ubuntu
- maxdb how to reset <SID>adm password
- How to use gnu readline to implement "reset password".
- Linux root password reset
- CentOS reset root password
- Reset Linux Root Password
- js收藏网页制作
- 导入导出数据库的两种方法
- 黑马程序员——java基础学习日记(5)
- Implementing a simple smart pointer in C++
- 什么叫符号调试
- How to reset a root password
- 黑马程序员——Java基础学习日记(4)
- C# 如何加载GIF
- 关于国产跨平台的开源游戏引擎LGame
- ps -ef|grep解析
- 数据库not exists 嵌套查询
- 黑马程序员——Java基础学习日记(3)
- 一个数拆分成连续自然数的和(只考加法的面试题)
- 比较描述子