Problem:
When using the su command to switch to the root user in the terminal, there will be an Authentication failure prompt.
Cause:
The root user has not been created.
(Recommended tutorial: centos tutorial)
Solution:
1. First use the shortcut key crtl alt T to open the terminal, and the user will be displayed. Name@computer name: ~$, the symbol $ means you are now under normal user rights.
2. Create a password for root
sudo passwd root
Enter the password. Passwd: password updated successfully will be displayed after success, and then you can switch to the root user.
Recommended related video tutorials: linux video tutorial
The above is the detailed content of When executing the su command to switch the root user under centos, it prompts that the authentication failed.. For more information, please follow other related articles on the PHP Chinese website!