Linux Instructions: User Management--sudo

Source: Internet
Author: User

Transferred from: http://www.jb51.net/linux/sudo.htm

——————————————————————————————————

Name: sudo
Usage rights: Users who are present in the/etc/sudoers
How to use: sudo-v
Sudo-h
Sudo-l
Sudo-v
Sudo-k
Sudo-s
Sudo-h
sudo [-b] [-P prompt] [-u username/#uid]-S
sudo command
Description: Executes the instruction as a system administrator, that is, instructions executed via sudo appear to be executed by the root himself.
Parameters:
-V Show version number
-H will show the version number and instructions for how to use it
-L Displays the permissions of itself (the user who executes sudo)
-V because Sudo does not execute in the first execution or in n minutes (n preset is five) will ask the password, this parameter is to confirm again, if more than n minutes, will also ask the password
-K will force the user to ask the password the next time sudo is executed (whether or not more than N minutes)
-B The instruction to be executed is placed in the background execution
-P Prompt can change the prompt for password, where%u will be substituted for the user's account name,%H will display the host name
-U username/#uid do not add this parameter, which means to execute the instruction as root, and add this parameter, you can execute the instruction as username (#uid is the user number of the username)
-S executes the shell specified by the shell in the environment variable, or the shell specified in the/etc/passwd
-h Specifies the home (home directory) in the environment variable as the user's home directory where you want to change the identity (if you do not add the-u parameter is the system administrator root)
command to execute AS System administrator (or change to other person with-u)
Example:
Sudo-l List the current permissions
SUDO-V listing version information for sudo

Linux Instructions: User Management--sudo

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.