On the ubuntu logon page, enter the password, and a page will pop up and return to the logon page. View auth. log and find the following error:
May 15 15:42:19 tim-vm lightdm: pam_unix (lightdm-greeter: session): session opened for user lightdm by (uid = 0)
May 15 15:42:20 tim-vm lightdm: PAM unable to dlopen (pam_kwallet.so):/lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
May 15 15:42:20 tim-vm lightdm: PAM adding faulty module: pam_kwallet.so
May 15 15:42:20 tim-vm lightdm: pam_succeed_if (lightdm: auth): requirement "user ingroup nopasswdlogin" not met by user "tim"
May 15 15:42:24 tim-vm lightdm: pam_unix (lightdm-greeter: session): session closed for user lightdm
After google, the same error was found in askubuntu.
Because of the. Xauthority File Permission problem, this permission is changed to root.
Change it to the user name.