Both methods Centos6 enter the single-user mode

Single-user mode of action

In the Linux system, maintenance personnel often encounter a problem, that is, a user with root privileges account and password, the always forget the root password would happen.
In such cases, under normal circumstances, maintenance personnel will carry out root password reset through the most commonly used method, that is, single-user mode.
Secondly, a single-user benefits the most prominent and useful is this: can no password, so if you forget your password, you can enter single-user mode to modify the login password.

method one

To reboot the system
(when below countdown Interface) boot kernel boot sequence selected interface Linux system Press any keyboard key so Linux boot residence kernel selection phase (may be any of the keys) so that Linux boot residence kernel selection stage up and down keys .

When one interface timing can press any key to enter the following interface, lowercase prompted to type E, the next step

into the screen below, select the beginning of the kernel (second) press the press e, 'the next step

press enter displays the edited interface is shown below the input space into the single finished
editing screen after the return to the second step, the direct input b reboot the system, the root user directly into the system restart mode, in this mode, you can use the root function thing


as a restart the system after step b inputs as shown below and the like will enter the single-user mode after waiting to  



enter the single-user mode input passwd can change the password, and then directly use the passwd command to change the root
to change the root password above operation is single-user mode, to solve the root password for the root user is locked and forgot that require root privileges to perform root problem and accounts can not be used.

Method Two

先重启系统
在Linux系统启动 内核启动顺序选择界面(如下图倒计时的界面时) 按键盘任意键 让Linux引导启动停留内核选择阶段通过上下键(任意按键也可以的)让Linux引导启动停留内核选择阶段。


在如下图界面键入字母 a

如下图 输入 (空格)1 回车 即可直接进入单用户模式

如上图输入完后 回车后等待一会 即可进入单用户模式

进入单用户模式一般是用于修改密码 修改完大部分人都会关机然后重启
这里有个便捷的方法  修改完密码后 直接按下快捷键ctrl+d  即可立即启动系统






Guess you like

Origin www.cnblogs.com/wenrulaogou/p/11995195.html
Recommended