| 分类: ~~~ Solaris ~~~ |
一、权限相关命令
chown usr1.usr1 tmpfile
将tmpfile授权给usr1用户,组权限改为usr1
-rwx--x--x
r=4 w=2 x=1
chmod 777 tmpfile
将tmpfile文件权限改为-rwxrwxrwx
chmod 444
tmpfile -r--r--r--
用户、组、其它用户权限均为只读
chmod 644 tmpfile
-rw-r--r--
所有者权限为读写,组和其它用户为只读
chmod 700 tmpfile
-rwx------
user为读写执行,group,others为无权限
chmod 750 tmpfile
-rwxr-x---
user为rwx,group为rx,others为无权限
chmod 4750 tmpfile
-rwsr-x--- SUID
chmod 2750 tmpfile
-rwxr-s--- SGID
chmod 6750 tmpfile -rwsr-s---
ls -al / | grep tmp
drwxrwxrwt 14
root
root
4096 May 26 15:04 tmp
chmod 1555
tmp1
r-xr-xr-t
可以写进目录,但只能删除自已拥有的文件
二、su命令安全相关
gpasswd -a usr1 wheel
将usr1加入wheel组
chown root.wheel /bin/su
把su文件授权给wheel组用户
chmod 4750
/bin/su
rwsr-s---
把su命令一般用户可使用权限取消,只允许wheel组使用
三、修改telnet用户超时时间
cd /etc/profile.d
vi secure.sh
TMOUT=1800
单位为秒,30分钟远程telnet超时
chmod 755 secure.sh
改变权限为所有用户可执行
四、禁止使用指定sheel
vi /etc/shells
删除/bin/ash
和/bin/bsh两项,禁止这两种方式登陆

加载中…