1. Role switching
Switch from general user to super user: su -, and then enter the root password,
switch back to: exit Super user switch to general user: su-username, and then enter the password of the user you want to use, and switch back to: exit
When we use the sudo command to switch users, we may encounter the following error: xxx is not in the sudoers file. This incident will be reported, xxx is your current user name, the reason is that the user did not join the sudo configuration File.
Solution: 1. Switch to the root user and run the visudo command
2. In the opened configuration file, find root ALL=(ALL) ALL, add a line below xxx ALL=(ALL) ALL where xxx is the name of the user you want to join
3. Enter: wq to save and exit the configuration file, use the sudo command again, and there will be no above prompt.
Two: Vmware prompts that it has failed to lock this configuration file exclusively. Another running VMware process may be using the configuration file
Reference: https://www.cnblogs.com/shenzhenhuaya/p/sfaegtrg.html