Problems logging into MacOS using Active Directory user not working, but SSH works fine I am having trouble with logging into our MacOS device in the office but I can SSH into the device and I can view the login screen via VNC. 

What steps can I use to troubleshoot why I cannot log into the Mac as any user?
I found a solution by deleting the user and creating a new user with the same name through the command line. I've no idea why the problem happened, but all other solutions didn't work.