csa005(Linux破解密码篇)

修改密码:paswd

[root@qingwu ~]# passwd
Changing password for user root.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.

删除密码:passwd -d  用户名

[root@qingwu ~]# passwd -d 123
Removing password for user 123.
passwd: Success

 由以下可知root然后修改密码可以任意长度,普通用户修改密码不可以,只有root用户可以删除密码;

[123@qingwu ~]$ passwd
Changing password for user 123.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
New password: 
BAD PASSWORD: The password is shorter than 8 characters
[root@qingwu ~]# passwd
Changing password for user root.
New password: 
BAD PASSWORD: The password is shorter than 8 rs
Retype new password: 
passwd: all authentication tokens updated sucy.
[123@qingwu ~]$ passwd -d 123
Only root can do that.

 只有root然后可以改其他人的密码;

[123@qingwu ~]$ passwd root
passwd: Only root can specify a user name.
[root@qingwu ~]# passwd 123
Changing password for user 123.
New password: 

 破解密码法一:

1)重启虚拟机 ,按e进入如下界面;

2)按向下箭头找到linux16行在其末尾加上 rd.break,按ctrl+x执行;

3)mount -o remount,rw /sysroot(以可读写的方式重新挂载/sysroot)回车;

4)chroot   /sysroot;

5)passwd root;

6)输入新密码;

扫描二维码关注公众号,回复: 10959309 查看本文章

7)确认密码;

8)touch /.autorelabel(创建一个隐藏标签文件);

9)exit;

10)exit。至此修改成功,可以用新密码登录。

发布了5 篇原创文章 · 获赞 0 · 访问量 27

猜你喜欢

转载自blog.csdn.net/weixin_44642263/article/details/105620762