Why Does su Fail with “Authentication Error”?

In Linux, the su (substitute user) is the built-in utility to switch the users. It bypasses the user restrictions and enables the user to work as different users for performing various tasks. While using the su command in the terminal, the user may face the error of “Authentication error/failure”.

This blog will signify the reason and solutions for the failure of the su with “Authentication Error”.

Reason 1: Root Password is Not Set

The reason for “Authentication Error” is that the user has not set up the root password, the error can be seen in the below image:

Reason 2: Incorrect Password 

Some people think that the error is due to the wrong password. Yes! The wrong password is the reason because most users use the system user password for the root. The user password is only linked with the user account only that can perform operations using sudo. While the root password is required to log in for the root user.

Solution: Set the Root Password

To set the root password the user can use the below-mentioned command, type the current user password, and set the new password for the root user:

$ sudo passwd root

The root password has been set.

Verify the Solution

Use the updated root password while executing the su command:

$ su -

Conclusion

There are two possible reasons for the failure of the su command: the root password is not set or the user is entering the root password incorrectly. To fix this error, the user can set or change the root password using the “sudo passwd root” command. 

The reasons and the solution for the error “su authentication error” has been illustrated in this guide.