Linux操作系统破解root密码

破解root密码流程:

>>英文版:

1.Reboot the system.

2.Interrupt the boot loader count down by pressing anykey.

3.Move the cursor to the entry that needs to be booted.

4.Press “e” to edit the select edentry.

5.Move the cursor to the kernel command line(the line that start swith linux16.

6.Append rd.break

7.Press Ctrl+x to start.

8.Remount /sysroot as read-write.

switch_root:/# mount -o remount,rw /sysroot

 

9.Switch into a chroot jail, where /sysroot is treated as the root of the filesystem tree

switch_root:/# chroot /sysroot

10.Set a new root password:

sh-4.2# passwd [root]        (change the root password)

or

sh-4.2# passwd -d root        (delete the root password)

11.Make sure that all unlabeled files (including/etc/shadow at this point)get relabeled during boot.

sh-4.2# touch /.autorelabel

12. sh-4.2# exit

13. switch_root:/# exit        

>>中文版:

1.重启虚拟机

按e进入界面

2.在 Linux16 所在行下一行末尾输入:空格 rd.break 按 Ctrl+x 启动

3.输入mount -o remount,rw /sysroot (mount挂载  -o选项  remount重新挂载  rw以读写的方式   在/sysroot目录下)

4.输入chroot /sysroot  (进入到sysroot目录进行破密)

5.输入passwd root  (改密)

6.输入新密码:

7.确认密码:

8.输入touch /.autorelabel (创建标签文件)

9.输入exit

10.输入exit

 

重启:reboot,  init 6

关机:shutdown -h now          poweroff,   init 0

产看当前Linux发行版本信息:cat /etc/redhat-release

Red Hat Enterprise Linux Server release 7.2 (Maipo)

[root@localhost 桌面]# uname -r   内核版本号

3.10.0-327.el7.x86_64   主版本号 . 子版本号 [ 修正版本号 [. 编译版本号 ]]

3---主版本号

10---次版本号

0---修订版本号

327.el7---表示修改了327次

  1. 项目出版本时,版本号可以为0.1或0.1.0,也可以为1.0或1.0.0
  2. 当项目在进行了重大修改局部修正累计较多,而导致项目整体发生全局变化时,主版本号+1
  3. 当项目在原有的基础上增加了部分功能时,主版本号不变,子版本号+1,修正版本号复位为0,因而可以被忽略掉
  4. 当项目在进行了局部修改是编译器在编译过程中自动生成的,我们只定义其格式,并不进行人为控制

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

猜你喜欢

转载自blog.csdn.net/weixin_43625429/article/details/85246893
今日推荐