Home>Article>Operation and Maintenance> When executing the su command to switch the root user under centos, it prompts that the authentication failed.

When executing the su command to switch the root user under centos, it prompts that the authentication failed.

王林
王林 Original
2020-03-30 14:43:09 5344browse

When executing the su command to switch the root user under centos, it prompts that the authentication failed.

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn