0

I was playing around with switching ttys. At some point, I locked my screen (CTRL + ALT + L) to switch user, and logged in to Guest. This opened up in tty8. I switched back to tty7 and logged out of my account, switched to tty8 and logged out of Guest.

I can no longer log into my actual account, but I can still log into Guest. I've restarted my computer, but I still can't log in.

I think the problem MUST lie with the tty switching, since nothing else I was doing was out of the usual and this has never happened before.

I'm using Ubuntu 12.04 on a ThinkPad W530.

UPDATE: I was able to create a new administrator account and log into that, so I still have access to all of my old files.

When I try to log in to the old account, the screen goes black for a second and I am returned to the log in screen.

I am able to log into my old account through tty1 and have access to everything.

1 Answers1

1

You likely orphaned the Xauthority file, which will prevent the graphical desktop from starting and create a login loop.

It's safe to delete the file and it will be automatically recreated when you restart.

From a tty, log in to the old account and delete the Xauthority file.

rm .Xauthority

The Xauthority file stores user authentication for the running x-session. The x-session is what allows the gui, desktop manager, etc run.

When you started an new x-session on tty8, you killed the old one, which left the authority file behind (orphaned) since the x-session did not have a chance to clean up.

Subsequent logins try to start the x-session, sees that the newly generated authorization information does not match what is stored in the orphaned file and terminates, kicking you back to the login screen.

Next time, switch users while on he regular graphical desktop (on tty7).

chaskes
  • 15,246