首页 > Linux操作系统 > Linux操作系统 > 【转帖】linux 中禁止普通用户关机权限
今天测试Redhat linux 4中,发现运行level 5 图形界面登录时,普通用户oracle等也能执行关机等操作.经发现.linux中普通用户默认能执行reboot,halt和poweroff等权限,一般为了安全起见,需要修改.以root用户进入/etc/security/console.apps目录下,删除reboot和halt及poweroff即可.[root@rac01 console.apps]# pwd/etc/security/console.apps[root@rac01 console.apps]# rm -rf poweroff[root@rac01 console.apps]# rm -rf reboot[root@rac01 console.apps]# rm -rf halt[root@rac01 console.apps]#
再以普通用户登录,执行上述关机命令,系统能识别,但没有反应.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23137730/viewspace-624815/ ,如需转载,请注明出处,否则将追究法律责任。
注册时间:2010-01-06