CentOS reset root password
来源:互联网 发布:ubuntu怎么解压缩zip 编辑:程序博客网 时间:2024/05/17 01:56
You forgot your root password. Nice work. Now you'll just have to reinstall the entire machine. Sadly enough, I've seen more than a few people do this. But it's surprisingly easy to get on the machine and change the password. This doesn't work in all cases (like if you made a GRUB password and forgot that too), but here's how you do it in a normal case with a Cent OS Linux example.
First reboot the system. When it reboots you'll come to the GRUB screen as shown in Figure 1. Move the arrow key so that you stay on this screen instead of proceeding all the way to a normal boot.
Figure 1. GRUB screen after reboot
Next, select the kernel that will boot with the arrow keys, and type E to edit the kernel line. You'll then see something like Figure 2:
Figure 2. Ready to edit the kernel line
Use the arrow key again to highlight the line that begins with kernel
, and press E to edit the kernel parameters. When you get to the screen shown in Figure 3, simply append the number 1
to the arguments as shown in Figure 3:
Figure 3. Append the argument with the number 1
Then press Enter, B, and the kernel will boot up to single-user mode. Once here you can run the passwd
command, changing password for user root:
sh-3.00# passwd
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully
Now you can reboot, and the machine will boot up with your new password.
- CentOS reset root password
- Centos 7 reset root password
- Linux root password reset
- Reset Linux Root Password
- How to Reset MySQL root Password on CentOS
- RHEL7 recover/reset root password
- How to Reset Forgotten Root Password in RHEL/CentOS and Fedora
- RHEL 7 / CentOS 7 : Single User Mode / Recovering / Reset Root Password
- forgot root password or reset root password in Debian
- How to Reset the Root Password
- FreeBSD reset or recover root password
- FreeBSD reset or recover root password
- FreeBSD reset or recover root password
- 编程经验:mysql reset root password
- How to reset a root password
- Reset the forgotten root password on Ubuntu
- linux reset the root user password
- Mac OS X - Reset MySQL Root Password
- 基于Hibernate框架的泛型DAO层---SwiftDAO
- Android获取Theme的背景颜色
- STL中的sort
- rails部署
- 三角形类
- CentOS reset root password
- VC6.0向工程中添加文件和打开文件出错“"0x5003eaed"指令引用的"0x00000000"内存”解
- 交叉编译问题
- Rational Software Architect
- 迪杰斯特拉算法+实现(注释)
- 黑马程序员_多线程
- (转) c#中如何设计一个窗体关闭,另一个窗体打开?
- Prim算法与Dijkstra算法的区别
- CGridView查询中遇到的问题,unsetAttributes() 方法