9

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?

3
  • 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, 2013 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, 2013 at 19:52
  • Exact same problem in 2021... but i can actually login after retrying the operation 5+ times. Happens in ubuntu, randomly
    – jav974
    Jun 17, 2021 at 16:00

4 Answers 4

8

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.

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

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).

2
  • 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
    – Arefe
    Dec 27, 2017 at 8:19
  • While going from Ctrl+Alt+F1 through Ctrl+Alt+F6 follow this link as well askubuntu.com/questions/266825/… Aug 19, 2019 at 16:01
2

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.

4
  • 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, 2017 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.
    – Ana Borges
    Nov 2, 2017 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, 2017 at 16:53
  • @pochinha you are right, GUI login is not working through its possible to log via the shell
    – Arefe
    Dec 26, 2017 at 14:18
2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .