27
10
2009
chkconfig: command not found
bigCat Posted in Linux - 0 Comment原来切换root的时候用su的缘故,身份且过来了环境变量还没切过来
赶紧exit了用 su - 来切换,就不会出现chkconfig: command not found了
原来切换root的时候用su的缘故,身份且过来了环境变量还没切过来
赶紧exit了用 su - 来切换,就不会出现chkconfig: command not found了
chown root:root /usr/bin/last
chmod 700 /usr/bin/last
创建一个wrapper(里面调用last $USER)
chown root:root /usr/other/last_wrapper
chmod +x /usr/other/last_wrapper
chmod +s /usr/other/last_wrapper
然后用户使用last_wrapper
other 添加到env的path
让用户跑last只能看见自己的信息
vi /root/.bash_profile
alias last='last $USER'