So I have a Debian distro at home (considering getting ubuntu), and I can't login. When I use the correct password is does this thing where it makes it look like it's going to login, and then it redirects to the login screen, but when I use an incorrect password it says "authentication failure". Does anyone know what could be causing this?

  • 8
    Check for errors in ~/.xsession_errors and /var/log/Xorg.0.log. You should be able to still login in via the console (Ctrl+Alt+F1). – jordanm Jan 26 '13 at 2:02
  • 2
    What desktop are you using? You could try switching to a console (Ctrl+Alt+F1 through Ctrl+Alt+F6), login, and type startkde (If you are using KDE, if not, leave a comment telling what desktop you are using), then post the errors if there are any. – BenjiWiebe Jan 26 '13 at 19:52

Perhaps your .profile, .bash_profile, /etc/profile, or .bashrc contains an error, and makes the shell exit?

If thats the case, use ctr-alt-F1 to enter the shell. use the command su - root to enter a root session, and then use nano or vi to edit the file that is broken.

  • Very possible, I was just editing it, but how can I fix that from the login? Is there a way to access the CLI? – OneChillDude Feb 1 '13 at 16:44
  • I can't find my bash profile. I even tried to use the locate command. What directories would they be in? – OneChillDude Feb 2 '13 at 17:18
  • With Mac OS keyboard that will be ‘CNTR+alt+f3+fn’ – U2m Dec 27 '17 at 8:22

Had exactly the issue as described. After switching to a console (Ctrl+Alt+F1 through Ctrl+Alt+F6), it appeared that the root folder was completely full (use df ). A simple sudo apt-get clean did the trick. After confirmation that the drive has space available, go back to login screen using Ctrl+Alt+F7).

  • This what happen to me after downloading the blockchain data 100+GB in the Debian machine in VM. Had to get new SSD in the case – U2m Dec 27 '17 at 8:19

I also have this problem from time to time, but the solutions here don't work. I found the following somewhere, but can't find it again, so here it is:

  1. Switch to a console with Ctrl+Alt+F3;
  2. Log in using the console (you are asked for your username and password right away);
  3. Type sudo chmod 1777 /tmp and the password for sudo;
  4. Go back with Ctrl+Alt+F7 and proceed normally.

Those are the standard permissions of /tmp and I have absolutely no clue why they should be wrong at log in. The only pattern I think I found is that I need to have tired to log in with a wrong password before using the correct one stops working.

  • While this might be a solution to something, how would the OP accomplish step 2, log in, when they can’t log in? – Jeff Schaller Nov 2 '17 at 15:34
  • 1
    Ah, I meant log in using the terminal. The OP can't log in using the graphical interface, but that doesn't necessarily mean that they can't log in at all. When you press Ctrl+Alt+F3, you are asked for your username and password before you can do anything else. At least in my case, which can be described exactly as OP described their problem, this works. – pochinha Nov 2 '17 at 16:46
  • I did see any reference from the OP about a graphical login (it’s not mentioned one way or the other). – Jeff Schaller Nov 2 '17 at 16:53
  • @pochinha you are right, GUI login is not working through its possible to log via the shell – U2m Dec 26 '17 at 14:18

Alternative cause and solution:

In my case, there was a syntax error in /etc/X11/xorg.conf. Judging by google results, this is a lot more rare than file permission problems. I found this out through attempting startx from the terminal (Ctrl+Alt+F2), which pointed me to a log file where it noted the syntax error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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