QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1402|回复: 5

XFCE4.2普通用户不能使用面板上的重启和关机?

[复制链接]
发表于 2005-8-6 09:08:58 | 显示全部楼层 |阅读模式
原来ROOT也不能,查找资料安装了SUDO,ROOT可以使用面板上的重启核关机了,但普通用户仍然不能。如何解决?
发表于 2005-8-6 10:28:45 | 显示全部楼层
请查看/etc/sudoers文件
回复

使用道具 举报

 楼主| 发表于 2005-8-6 10:55:34 | 显示全部楼层
这是我的sudoers,如何修改呢?

# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL) ALL
回复

使用道具 举报

 楼主| 发表于 2005-8-6 11:05:04 | 显示全部楼层
在GOOGLE上找到了。哈哈:
chmod +wr /etc/sudoers
在/etc/sudoers下添加
你的名字      ALL=NOPASSWD:ALL
然后
chmod 0440 /etc/sudoers

这样,在非root下就能使用面板上的关机和重启了~
回复

使用道具 举报

发表于 2005-8-6 16:09:50 | 显示全部楼层
权限修改太多余,只要用root用户添加
yourusername ALL=NOPASSWD:ALL
保存的时候用
:wq!
就可以了
回复

使用道具 举报

发表于 2005-8-7 19:01:51 | 显示全部楼层
嫌麻烦就加个situid, 不过还是推荐demonlj的方法, 比较标准
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-7-19 08:59 , Processed in 0.065454 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

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