sudo su user 和 sudo user 的区别

“sudo” lets you run commands in your own user account with root privileges. It uses a config file (/etc/sudoers) which lists which users have rights to specific actions (run commands as root, etc.)     When invoked, it asks for the password of the user who started it. 

     [user1@server]$ sudo user

     [sudo] password for user1: 

      “ su “   lets you switch user so that you're actually logged in as root. It starts another shell instance with privileges of the target user.

        To ensure you have the rights to do that, it asks you for the password of the target user. As we enabled you to switch user through cfengine,It won’t ask you for target password. 

       [user1@server]$ sudo su uicaci

       [user@server]$

你可能感兴趣的:(sudo su user 和 sudo user 的区别)