究竟什么是effective user id和real user id,effective group id 我看得头都大了 大哥大姐,帮俺一把!!!!!!
by nick811125 - 程序开发 - 2006-04-04 18:11:15 阅读(810) 回复(2)
#include
根据我的理解,做了下面的实验: 在数据库/etc/security/exec_attr中插入: shut:suser:cmd:::/usr/sbin/shutdown:uid=0 在数据库/etc/security/prof_attr中: shut:::It is for a account to shutdown the system: 在数据库/etc/user_attr中: shut_role::::type=role;profiles=shut 执行useradd 命令: #useradd –m –d /export/home/usera –s /bin/ksh –R shut_role usera 以usera的身份登录。 #su sole_shut #/usr/sbin/s...
由于用户在UNIX下经常会遇到suid、SGID的概念,而且suid和SGID涉及到系统安全,所以用户也比较关心这个问题。关于suid、SGID的问题也经常有人提问,但回答的人一般答得不够详细,加上曾经回答过两个网友的问题,还查了一些资料,决定整理成本文,以供大家参考。限于本人的水平问题,文章中如果有不当之处,请广大网友指正。 一、UNIX下关于文件权限的表示方法和解析 suid 是 Set User ID, SGID 是 Set Group ID的意思。 UNIX下...
test.sh是一个shell脚本文件,其内容如下: #!/bin/bash ls /root test.sh文件的权限如下所示: -rwsr--r-x 1 root root 31 2月 22 11:30 test.sh 以普通用户dian登录,执行test.sh文件,显示如下错误: ls: /root: 权限不够 这个错误是为什么? test.sh文件不是已经设置了suid位了吗?那么普通用户执行test.sh时应该可以获得root用户的权限,所以应该不会出错的,但是为什么报了上面所示的错误?请高手指点一二,本人不胜...