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. 当项目在进行了局部修改是编译器在编译过程中自动生成的,我们只定义其格式,并不进行人为控制

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值