Action object: System command
Root can only be used by Super User command to give ordinary users execute
How to use: #visudo
#实际修改的是/etc/sudousers file (man 5 sudousers view command format notation)
Root all= (All) all
User name Managed address = (can use Identity) Authorization command (absolute path)
#%wheel all= (All) all
Group name Managed address = (can use Identity) Authorization command (absolute path)
Example 1: The authorized SC user can restart the machine
Su All=/sbin/shutdown-r now
(such as querying this path can be used where is shutdown to see the path/sbin/shutdown)
For example 2:SU-SC #切换到sc用户
#sudo-L #查看可用的sudo命令
#sudo/sbin/shutdown-r now #普通用户执行sudo赋予的命令
This article is from the "Day to survive, Night development" blog, please be sure to keep this source http://perter.blog.51cto.com/1962646/1837242
Settings for sudo permissions