I am a new elementary OS user and I just installed it on a PC.

The installation took place as normal. However, when I put the password in and it begins to login after 3 seconds the screen goes black and back to screen users.

  • Hello, welcome to community, did this behaviour occur just after the installation?
    – psukys
    Commented Nov 18, 2015 at 20:58
  • Did you install anything before this happend?
    – user3
    Commented Nov 19, 2015 at 15:09
  • I have the same Problem but everytime i writen one of These Commands i became this answer: „command sed is in /bin/sed aviable The command could not be found because usr is not part of the environment variable PATH .“ How i can fix this Problem?
    – Nicolas
    Commented Jun 26, 2019 at 10:16

6 Answers 6


Press Ctrl+Alt+F3 and login into the terminal with your username and password. Your password will not show * or anything, but it is being typed.

Now run ls ~ -lah to list files in your home folder. If in the output the line

-rw-------  1 root root   53 Nov 29 10:19 .Xauthority

appears then your .Xauthority file has the wrong permissions. You need to do sudo chown $USER:$USER .Xauthority and try logging in.

If you don't see that line, do ls -ld /tmp. Check for the first 10 letters in the left: they should read exactly like so: drwxrwxrwt.

drwxrwxrwt 15 root root 4096 Nov 30 04:17 /tmp

If they don't, you need to run the command sudo chmod a+wt /tmp and check again.

If neither of these work, I'd recommend you either

  1. Run this command:

    dpkg-reconfigure lightdm

    to reconfigure lightdm - the login manager.

  2. Or uninstall lightdm, and reinstall it with this command:

    sudo apt-get install --reinstall lightdm

Now restart the computer with this command:

sudo shutdown -r now

and login again.

To prevent this issue in the future, don't run GUI (Graphical User Interface) programs with sudo. If you have to (for example to open the file manager) add the -H flag - so you run sudo -H command-goes-here.

  • 2
    Tim, can you edit this post to explain what each of these commands is intended to do? It would also be helpful to explain what the problem is, possible causes, and how to avoid those in the future. Commented Nov 29, 2015 at 0:25
  • 2
    @DanielForé done
    – user3
    Commented Nov 29, 2015 at 0:28

i had same issue... was going around in circles.. couldn't even load a usb installer to back end the HDD version..

it was a memory issue.. i logged through tty3 and cleared out my downloads and documents and hey presto.. i only wasted 3 hours of my life!


I'm stuck on the login form too. I just installed Elementary and this is my very first login attempt. I already checked my .Xauthority file: it is property of my personal user (not root). I also reinstalled lightdm but nothing changed. Someone has an hint for a linux noob like me? :D Thanks a lot


Like PierPaolo Zus, I have the same problem right now. It happened a few days ago after installing updates. I guess something in the update broke lightdm.

I have tried all the things proposed here.

What I did as a workaround is that I installed kde-full and sddm and then I use sddm as login manager and KDE as desktop environment. This is NOT a real solution. But it is a workaround that allows me to use my computer again.

I hope someone knows how to actually fix this.


I've managed to get past the lock screen by accessing alternative text-based shell session with Alt + Ctrl + F1/6 then switching between login managers, namely lightdm and gdm3 by invoking sudo dpkg-reconfigure then pass your current display manageras the final argument. Finally reversed the same step back again.


After upgrading (including a new kernel which usually takes up a bit of space), I ran into the same problem. Freeing up some disk space as mentioned before did the trick. For this, I

  1. Pressed Ctrl + Alt + F1 on the login screen to open a TTY
  2. Logged in
  3. Ran sudo apt autoremove to purge old packages (confirm prompt)
  4. Ran reboot to restart

This happened to remove some older Kernel version which freed up enough space for the login to work again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.