How can I let users run a script with root permissions?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Given the dangers of SUID shell scripts , is there a more secure way of giving passwordless access to scripts (bash, PHP) with root permissions in Linux? (Ubuntu 8.10) 回答1: You could consider sudo . Although not 'passwordless', it doesn't require the user to be given the root password. It can also provide an audit trail of use of the script. edit: as per comment from Chris, there is an option not to require a password at all for certain commands, see here for details. It can also be set up not to prompt excessively for the password