Settings for sudo permissions

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.