Solution to su root authentication failure (ubuntu)

After Ubuntu is installed, the root user is locked by default, and is not allowed to log in, nor is it allowed to execute the "su command to root". For desktop users, this can improve security, but for the server, it can be set to allow "su command to root, but root user is not allowed to log in directly". Therefore, for the problem that Ubuntu enters the su command prompting authentication failure, you can reset it. root password to resolve:

sudo passwd
[sudo] password for xxx: <--- 输入安装时那个用户的密码
Enter new UNIX password: <--- 新的root用户密码
Retype new UNIX password: <--- 重复新的root用户密码
passwd:已成功更新密码

Guess you like

Origin blog.csdn.net/sinat_33101665/article/details/128938501