23 06 2009

last_wrapper

bigCat Posted in Linux - Comment.isBlank

chown root:root /usr/bin/last\r\nchmod 700 /usr/bin/last\r\n创建一个wrapper(里面调用last $USER)\r\nchown root:root /usr/other/last_wrapper\r\nchmod +x /usr/other/last_wrapper\r\nchmod +s /usr/other/last_wrapper\r\n然后用户使用last_wrapper\r\n\r\nother 添加到env的path\r\n\r\n让用户跑last只能看见自己的信息\r\nvi /root/.bash_profile\r\nalias last='last $USER'

Host: (miao) | Word: Press | Code: HTML5