Linux User identity switch

Source: Internet
Author: User


Su-Used to initialize environment variables $PATH $HOME, etc.
sudo su to root requires input of root password is not secure
visudo Edit/etc/sudoers config file no command required to install Yum install-y sudo
format: User host= (as_user) commands
For example: aming all= (Root)/bin/ls//It means, let aming this ordinary user, have root authority, for LS this command.

application: Only allow the use of ordinary account login, and ordinary account login, you can not enter the password can be sudo switch to the root account (Root does not allow remote logins)
user_alias user_su = Test, test1, aming//user alias, can write multiple users
Cmnd_alias SU =/bin/su//aliases for commands, multiple commands can be written
User_su all= (All) NOPASSWD:SU//The nopasswd means that the normal user does not need to enter their own password when using sudo.

This article is from the "Computer Network" blog, please be sure to keep this source http://reder.blog.51cto.com/10844461/1713123

Linux User identity switch

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.