红联Linux门户
Linux帮助

让指定的用户reboot计算机

发布时间:2007-10-21 00:19:01来源:红联作者:Dalandenz
假设我们要让用户fuleru拥有reboot的权限,可以用uid/gid来完成控制:

# groupadd reboot
# cd /usr/local
# mkdir reboot
# chown root:reboot reboot/
# chmod 750 reboot/
# cd reboot
# cp /sbin/reboot .
# chmod 4755 reboot
# usermod -G reboot fuleru

现在,fuleru就可以运行/usr/local/reboot/reboot来重启动机器。
文章评论

共有 0 条评论