linux-Command-su-sudo

Source: Internet
Author: User

Command: Su[options] Username

-,-l,--login:make Shell as login shell, which makes a shell a login shell, such as executing Su-pzhang, indicates that the user wants to change the identity to become Pzhang, and uses the Pzhang user's environment variable configuration. such as:/ Home/pzhang/.bash_profile, etc.

-C,--command=command:pass a single command to the shell with-c switch to a shell, execute a command, and then exit the user environment that you are switching to.

-S,--Shell

Root authorization

Command: sudo [options]

Note: with the sudo command, we can classify certain superuser privileges into specific (fine) authorization to the specified ordinary user, and the normal user does not need to know the root password to use the obtained authorization (root privileges that the administrator really allows). So it's no exaggeration to say that The sudo command, relative to the SU command, has made a lot of progress in the management of the system user's rights, and the centralization management has been guaranteed in theory, which strengthens the security aspect of the system.

Visudo Modifying a user's permissions is approximately equivalent to modifying/etc/sudoers

Add% (Percent semicolon) for group authorization

Nopasswd:all representative does not require password execution commands

-l:list

-C: Configuration file Syntax check

linux-Command-su-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.