QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1180|回复: 5

以root进入。不能锁定屏幕 和解?

[复制链接]
发表于 2003-5-14 02:22:07 | 显示全部楼层 |阅读模式
找了个英文的说明。谁能大概说一下到底是什么意思呢

When I'm logged in as root, xscreensaver won't lock my screen!

Don't log in as root.

Please note that xscreensaver works fine as a screen saver when you are logged in as root: it will not, however, lock your screen when you are logged in as root. This is for good and insurmountable security reasons.

In order for it to be safe for xscreensaver to be launched by xdm, certain precautions had to be taken, among them that xscreensaver never runs as root. In particular, if it is launched as root (as xdm is likely to do), xscreensaver will disavow its privileges, and switch itself to a safe user id (such as ``nobody''.)

An implication of this is that if you log in as root on the console, xscreensaver will refuse to lock the screen (because it can't tell the difference between root being logged in on the console, and a normal user being logged in on the console but xscreensaver having been launched by the xdm ``Xsetup'' file.)

The solution to this is simple: you shouldn't be logging in on the console as root in the first place! (What, are you crazy or something?)

Proper Unix hygiene dictates that you should log in as yourself, and su to root as necessary. People who spend their day logged in as root are just begging for disaster.
发表于 2003-5-14 09:16:04 | 显示全部楼层
我过去遇到过,好像要执行xhost +127.0.0.1
回复

使用道具 举报

发表于 2003-5-14 09:40:22 | 显示全部楼层

Re: 以root进入。不能锁定屏幕 和解?

[quote:bea818c2e3="Linuxjia"]找了个英文的说明。谁能大概说一下到底是什么意思呢

When I'm logged in as root, xscreensaver won't lock my screen!

Don't log in as root.

Please note that xscreensaver works fine as a screen saver when you are logged in as root: it will not, however, lock your screen when you are logged in as root. This is for good and insurmountable security reasons.

In order for it to be safe for xscreensaver to be launched by xdm, certain precautions had to be taken, among them that xscreensaver never runs as root. In particular, if it is launched as root (as xdm is likely to do), xscreensaver will disavow its privileges, and switch itself to a safe user id (such as ``nobody''.)

An implication of this is that if you log in as root on the console, xscreensaver will refuse to lock the screen (because it can't tell the difference between root being logged in on the console, and a normal user being logged in on the console but xscreensaver having been launched by the xdm ``Xsetup'' file.)

The solution to this is simple: you shouldn't be logging in on the console as root in the first place! (What, are you crazy or something?)

Proper Unix hygiene dictates that you should log in as yourself, and su to root as necessary. People who spend their day logged in as root are just begging for disaster.[/quote]

[code:1]当我以root身份登录时,xscreensaver不能锁定我的屏幕!

不要以root身份登录.

请注意到xscreensaver在你以root的身份登录时照样工作正常:但是, 它将不会锁住你的屏幕. 这是为了你的方便和安全.

在xdm安全地执行xscreensaver时,一些预防措施必须执行, 其中之一就是从不以root的身份运行. 特别是当以root身份登录并执行xscreensaver时, 它会自动否定你的特权, 并转换到另一安全的用户ID.

以此有关联的就是如果你在控制台以root登录,xscreensaver会拒绝锁住屏幕(因为它不能分别在控制台登录的root和普通用户的区别,并且普通用户在控制台登录,但xscreensaver却是xdm "Xsetup"文件启动的).

解决问题的方法很简单, 你不应在控制台以root的身份登录(你是疯掉了吗?)

正确的Unix安全概念指出你应该以普通用户的身份登录, 然后再用su指令转到root,如果你的确需要. 那些整天用root登录的人只是在企求灾难的发生.[/code:1]
回复

使用道具 举报

发表于 2003-5-14 09:41:13 | 显示全部楼层
从安全的角度考虑,以root用户登录X是不安全的,有一些系统禁止root用户登录X
以root用户登录X,并锁定屏幕更加不安全
回复

使用道具 举报

发表于 2003-5-15 20:22:20 | 显示全部楼层
我说怎么不能锁定屏幕哪,原来如此,我整天都是用root的,看样子要改一改这习惯了
回复

使用道具 举报

发表于 2003-5-16 08:18:33 | 显示全部楼层
可以锁定,但是要xhost +一个才行。比较麻烦
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-16 18:28 , Processed in 0.041344 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表