LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1105|回复: 2

为什么我新建的帐号不能使用sudo?

[复制链接]
发表于 2006-9-19 19:46:23 | 显示全部楼层 |阅读模式
以下是我的sudoer文件设置:
sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# User privilege specification
root ALL=(ALL) ALL
mxf ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
%wheel ALL=(ALL) ALL

# Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL

# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now

已经给了用户mxf root权限,而且也把mxf放到了wheel组,但是用mxf登录运行sudo总是出错:
[mxf@localhost home]$ sudo cd zk/
Sorry, sudo must be setuid root.

请问问题出在什么地方?
发表于 2006-9-19 22:18:26 | 显示全部楼层
你改过sudo的权限?

chmod +s /usr/bin/sudo
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-9-20 08:57:19 | 显示全部楼层
谢谢wildfire,以前只注意到了文件的rwx属性,还不晓得有个setuid位。
通过查资料和帖子了解到设置setuid位就是让filename的执行者以filename拥有者的权限执行filename,这个我明白了,但是就弄不懂为什么通过chmod +s filename后原本属性为777的文件的属性就变成了-rwsrwsrwx,这两个s是怎么算出来的呢?
回复 支持 反对

使用道具 举报

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

本版积分规则

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