标签:破解root密码
一、破解root密码
1、启动时任意键暂停启动
2、按e键进入编辑模式
3、将光标移动linux16开始的行,添加内核参数rd.break
4、按ctrl-x启动,输入如下命令
mount –o remount,rw /sysroot
chroot /sysroot
passwd root
touch /.autorelabel #创建label标签
图示:
二、图形界面及其字符界面切换
1、查看/etc/inittab配置文件,查看其提示即可。
[root@centos7 ~]# cat /etc/inittab # inittab is no longer used when using systemd. # # ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM. # # Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target # # systemd uses ‘targets‘ instead of runlevels. By default, there are two main targets: # # multi-user.target: analogous to runlevel 3 # graphical.target: analogous to runlevel 5 # # To view current default target, run: # systemctl get-default # # To set a default target, run: # systemctl set-default TARGET.target # [root@centos7 ~]#
2、命令行输入命令或自行创建软连接即可。
图示:
本文出自 “小耳朵” 博客,请务必保留此出处http://purify.blog.51cto.com/10572011/1854660
标签:破解root密码
原文地址:http://purify.blog.51cto.com/10572011/1854660