ubuntu root 密码的问题

From: http://www.i170.com/article/15754

新接触ubuntu的人(base on debian),大多会因为安装中没有提示root密码而不太清楚为什么会这样。根据ubuntu的中文文档,总结了本文。

关键词:如何设定/改变/启用 root 使用者的密码?

为了启用 root 帐号 (也就是 设置一个口令) 使用:
sudo passwd root

当你使用完毕后屏蔽 root 帐号 使用:
sudo passwd -l root
这个将锁住 root 帐号.

如果需要再次解锁,使用
sudo passwd -u root

如何在终端机模式下切换到 root 身份?
sudo -s -H
Password: 在这注明您的密码

缺省禁止 root 的好处包括了以下内容.

起初 Ubuntu 团队希望安装尽可能的简单. 不使用 root , 在安装期间的两个用户交互步骤可以省略. (科林·沃森)

更进一步, 如果在安装中使用 root, 用户将被要求永远记住他们选择的密码--即使他们很少使用到它. Root 密码经常被对 Unix 安全模型不熟悉的用户忘记. (马特·齐默曼)

它防止了缺省登录时 "我能做任何事情" --在较大的变化发生之前,你将被提示输入口令,这可以使你考虑你这样做的结果. 如果你作为 root 登录, 你可以删除一些 "没用的文件夹" 并且不会意识到你正处于错误的目录,那时已经太晚了. 它是在 Unix 下长时间使用 "su-command-^D" 练习的情况下,代替一直呆在 root shell--除非你做严重的系统维护 (那时你仍然可以使用 "sudo su"). (吉姆·奇塔姆 和 安德鲁·索巴拉)

Sudo 增加了运行命令的日志记录 (在 /var/log/auth.log). 如果你陷入困境, 你总是可以返回并看见那些运行的命令. (安德鲁·Zbikowski)

安全

与传统的 superuser 模型相比,这种方法有不同的利弊,两者都不总是显示优良的.

在鼓励使用 root 权限执行一个单独的命令, sudo 好过打开一个 shell:

有一个单独的 root 密码 (传统模型) 提供了一层额外的保护,当如果一个管理员的密码被侵害时。

无论怎样, 如果管理员 (使用 sudo 或 su 变成 root) 被侵害, 攻击者一般可以通过一次间接的攻击来获得 root

Tags: linux, root, ubuntu, 安装, 密码

相关日志

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

还没有评论。

发表评论

(必填)

(必填)


*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Comment moderation is enabled. Your comment may take some time to appear.