LinuxSir.cn,穿越时空的Linuxsir!

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

passwd 的t -- sticky位是什么意思?

[复制链接]
发表于 2003-5-31 09:08:41 | 显示全部楼层 |阅读模式
那个大侠给解释一下把
发表于 2003-5-31 12:59:13 | 显示全部楼层
粘连位,作用就是有些临时文件如果设置了粘连,那么,别的用户就无法删除他.具体到passwd中的用法请参考:man passwd
 楼主| 发表于 2003-5-31 14:39:20 | 显示全部楼层
ls -ld /tmp/
drwxrwxrwt    6 root     root         4096 2003-05-31 14:28 /tmp/
这个tmp是不是每次系统重新启动都会被自动清空的,
命令在那个文件,我查了rc2.d没找到,我的系统缺省进入是2
发表于 2003-6-1 23:34:07 | 显示全部楼层
这个目录是系统专门存放临时文件的目录,只有root有权限清空/删除.因为他被赋予t位.因为这里也许会存放很多用户产生的tmpfile,很难免会造成错误的操作,像rm等危险动作,因此,用户把属于自己的临时文件设成粘连,这样作的目的就是你只能删自给的临时文件.这就是粘连最实用的用法.
passwd 的t -- sticky位是什么意思?
怎么在passwd的用法中没有t这个选项?
[quote]
$passwd --help
Usage: passwd [OPTION...] <accountName>
  -k, --keep-tokens       keep non-expired authentication tokens
  -d, --delete            delete the password for the named account (root only)
  -l, --lock              lock the named account (root only)
  -u, --unlock            unlock the named account (root only)
  -f, --force             force operation

  -x, --maximum=DAYS      maximum password lifetime (root only)
  -n, --minimum=DAYS      minimum password lifetime (root only)
  -w, --warning=DAYS      number of days warning users receives before
                          password expiration (root only)
  -i, --inactive=DAYS     number of days after password expiration when an
                          account becomes disabled (root only)
  -S, --status            report password status on the named account (root
                          only)
  --stdin                 read new tokens from stdin (root only)

Help options:
  -?, --help              Show this help message
  --usage                 Display brief usage message
[/qutoe]
发表于 2003-6-2 03:52:52 | 显示全部楼层
you should see man chmod, right? chmod +t
发表于 2003-6-2 03:55:15 | 显示全部楼层
or chmod 1755 filename, 1 for sticky, 2 for GUID, and 4 for SUID
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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