linux下忘记root密码如何找回

57次阅读
没有评论

共计 1248 个字符,预计需要花费 4 分钟才能阅读完成。

本文丸趣 TV 小编为大家详细介绍“linux 下忘记 root 密码如何找回”,内容详细,步骤清晰,细节处理妥当,希望这篇“linux 下忘记 root 密码如何找回”文章能帮助大家解决疑惑,下面跟着丸趣 TV 小编的思路慢慢深入,一起来学习新知识吧。

以 root 身份登陆, 执行:

# passwd  用户名  (修改密码)
# useradd  用户名  (添加用户)

具体示例如下:

[root@bogon ~]# passwd root
changing password for user root.
new unix password:
bad password: it is based on a dictionary word
retype new unix password:
passwd: all authentication tokens updated successfully.

linux 下 root 密码找回方法

linux 的 root 享有至高无上的权力, 一旦 root 密码忘记或者被盗, 是一件非常头痛的事情, 那么怎么样才能找回 root 的密码呢, 本人把其总结如下:

(一)linux 系统密码破解

1. 在 grub 选项菜单按 e 进入编辑模式

2. 编辑 kernel 那行 /init 1 (或 /single)

3. 按 b 重启

4. 进入后执行下列命令

root@#passwd root (配置 root 的密码)
enter new unix password: 输入新的密码
root@#init 6

(二)debian linux 系统密码破解

1. 在 grub 选项菜单 debian gnu/linux,…(recovery mode) , 按 e 进入编辑模式

2. 编辑 kernel 那行面的 ro single 改成 rw single init=/bin/bash, 按 b 执行重启

3. 进入后执行下列命令

root@(none)#mount -a
root@(none)#passwd root
root@(none)#reboot

(三)freebsd 系统密码破解

1. 开机进入引导菜单

2. 选择每项 (按 4) 进入单用户模式

3. 进入之后输入一列命令

root@#mount -a
root@#fsck -y
root@#passwd(修改密码命令)

Linux 有哪些版本

Linux 的版本有:Deepin、UbuntuKylin、Manjaro、LinuxMint、Ubuntu 等版本。其中 Deepin 是国内发展最好的 Linux 发行版之一;UbuntuKylin 是基于 Ubuntu 的衍生发行版;Manjaro 是基于 Arch 的 Linux 发行版;LinuxMint 默认的 Cinnamon 桌面类似 Windows XP 简单易用;Ubuntu 则是以桌面应用为主的 Linux 操作系统。

读到这里,这篇“linux 下忘记 root 密码如何找回”文章已经介绍完毕,想要掌握这篇文章的知识点还需要大家自己动手实践使用过才能领会,如果想了解更多相关内容的文章,欢迎关注丸趣 TV 行业资讯频道。

向 AI 问一下细节

丸趣 TV 网 – 提供最优质的资源集合!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2024-02-04发表,共计1248字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)