Hi. I'm running Bunsenlabs hydrogen and joined AD domain. I'll skip that part, cause it totally taken from Debian.
When domain user trying to login in GUI, lightdm let them in, then black screen flashes with black and gets back to login prompt.
[+389.01s] DEBUG: Session pid=656: Greeter start authentication for [email protected]
[+389.01s] DEBUG: Session pid=682: Sending SIGTERM
[+389.01s] DEBUG: Session pid=685: Started with service 'lightdm', username '[email protected]'
[+389.01s] DEBUG: Session pid=682: Terminated with signal 15
[+389.01s] DEBUG: Session: Failed during authentication
[+389.01s] DEBUG: Seat: Session stopped
[+389.03s] DEBUG: Session pid=685: Got 1 message(s) from PAM
[+389.03s] DEBUG: Session pid=656: Prompt greeter with 1 message(s)
[+391.92s] DEBUG: Session pid=656: Continue authentication
[+398.86s] DEBUG: Session pid=685: Authentication complete with return value 0: Success
[+398.86s] DEBUG: Session pid=656: Authenticate result for user [email protected]: Success
[+398.86s] DEBUG: Session pid=656: User [email protected] authorized
[+398.86s] DEBUG: Session pid=656: Greeter sets language ru_RU.utf8
[+398.93s] DEBUG: Session pid=656: Greeter requests session lightdm-xsession
[+398.93s] DEBUG: Seat: Stopping greeter; display server will be re-used for user session
[+398.93s] DEBUG: Session pid=656: Sending SIGTERM
[+398.95s] DEBUG: Session pid=656: Greeter closed communication channel
[+398.95s] DEBUG: Session pid=656: Exited with return value 0
[+398.95s] DEBUG: Seat: Session stopped
[+398.95s] DEBUG: Seat: Greeter stopped, running session
[+398.95s] DEBUG: Launching process 690: /usr/lib/bunsen/configs/bl-user-setup
[+399.04s] DEBUG: Process 690 exited with return value 1
[+399.04s] DEBUG: Seat: Exit status of /usr/lib/bunsen/configs/bl-user-setup: 1
[+399.04s] DEBUG: Seat: Switching to greeter due to failed setup script
[+399.04s] DEBUG: Seat: Creating greeter session
[+399.04s] DEBUG: Session pid=691: Started with service 'lightdm-greeter', username 'lightdm'
[+399.04s] DEBUG: Session pid=685: Exited with return value 0
[+399.04s] DEBUG: Seat: Session stopped
[+399.06s] DEBUG: Session pid=691: Authentication complete with return value 0: Success
[+399.06s] DEBUG: Seat: Session authenticated, running command
[+399.06s] DEBUG: Session pid=691: Running command /usr/sbin/lightdm-gtk-greeter
[+399.06s] DEBUG: Creating shared data directory /var/lib/lightdm/data/lightdm
[+399.06s] DEBUG: Session pid=691: Logging to /var/log/lightdm/x-0-greeter.log
[+399.07s] DEBUG: Activating VT 7
[+399.07s] DEBUG: Activating login1 session c2
[+399.16s] DEBUG: Session pid=691: Greeter connected version=1.10.3
[+399.41s] DEBUG: Session pid=691: Greeter start authentication
[+399.41s] DEBUG: Session pid=698: Started with service 'lightdm', username '(null)'
[+399.42s] DEBUG: Session pid=698: Got 1 message(s) from PAM
[+399.42s] DEBUG: Session pid=691: Prompt greeter with 1 message(s)
Apr 7 14:44:57 hydrogen-test lightdm[588]: /usr/lib/bunsen/configs/bl-user-setup: variable USER has not been set correctly.
I've looked into that script and noticed, that it can't handle usernames like 'user@domain'
For workaround i've moved template to /etc/skel and remove setting from /usr/share/lightdm/lightdm.conf.d/50_bunsen.conf