查看: 36961|回复: 42

linux 单用户密码破解

[复制链接]
发表于 2015-3-18 20:08:11 | 显示全部楼层 |阅读模式
本帖最后由 以谁为师 于 2015-3-21 23:48 编辑

ubuntu
1,开机到grub时,用上下键移到第二行的恢复模式,按e(注意不是回车)
即Ubutn,kernel 2.6.12-9-386(recovery mode)
2,把ro single 改成rw single init=/bin/bash      然后按ctrl+x

RHEL 6/centos 6
1. grub
进入启动画面之后,敲入“e”,把光标移动到kernel ...那一行,再敲入“e”,在kernel 一行的最后加上空格single,回车
敲入“b”,启动系统,即进入单用户模式,
这个时候就可以用passwd命令改密码了。
passwd root
改完以后reboot重启。
2. lilo
进入lilo命令行模式,敲入linux single,即进入单用户模式。



REHL7/Centos 7 (grub2)
If you have lost or forgot root password of RHEL7, you can follow this step to change to a new password, this is different with the RHEL6  single-usermode,
1, press e button in GRUB 2 boot screen.
2, at the end of Linux line add init=/bin/sh and remove 'rhgb' and 'quiet'
3, Ctrl+x to boot the system with the parameter
4, remount the file system as writable, run the mount -o remount, rw / command
5, passwd to change password.
6, make sure SELinux context of the files that were modified is restored, touch /.autorelabel
7, last step, resume the initialization and finish the system boot. exec /sbin/init

1. 添加init=/bin/sh  移除'rhgb' and 'quiet'
2. Ctrl+x
3. mount -o remount, rw /
4. passwd
5. touch /.autorelabel {selinux 开启时}
6. exec /sbin/init
7. 进入单用户显示乱码使用:LANG=zh-cn.utf8

回复

使用道具 举报

头像被屏蔽
发表于 2015-3-18 20:48:43 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

发表于 2015-3-18 21:12:55 | 显示全部楼层
来看看吧 支持下  哈哈
回复 支持 反对

使用道具 举报

发表于 2015-3-19 12:46:21 | 显示全部楼层
支持支持支持一下
回复 支持 反对

使用道具 举报

发表于 2015-6-28 13:44:26 | 显示全部楼层
学习学习技术,加油!
回复 支持 反对

使用道具 举报

发表于 2015-6-29 14:40:08 | 显示全部楼层
支持,看起来不错呢!
回复 支持 反对

使用道具 举报

发表于 2015-6-29 17:15:46 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2015-7-2 04:10:16 | 显示全部楼层
感谢楼主的分享~
回复 支持 反对

使用道具 举报

发表于 2015-7-2 07:42:13 | 显示全部楼层
还是不错的哦,顶了
回复 支持 反对

使用道具 举报

发表于 2015-7-2 08:05:52 | 显示全部楼层
感谢楼主的分享~
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

指导单位

江苏省公安厅

江苏省通信管理局

浙江省台州刑侦支队

DEFCON GROUP 86025

旗下站点

邮箱系统

应急响应中心

红盟安全

联系我们

官方QQ群:112851260

官方邮箱:security#ihonker.org(#改成@)

官方核心成员

Archiver|手机版|小黑屋| ( 沪ICP备2021026908号 )

GMT+8, 2025-3-7 07:05 , Processed in 0.024316 second(s), 13 queries , Gzip On, MemCache On.

Powered by ihonker.com

Copyright © 2015-现在.

  • 返回顶部