

Ask HN: Cannot Login to My Machine With The *Correct* Password [Solved] - tzury

I have posted this issue on ServerFault[1] and AskUbuntu[2] but got closed or no answer so far (~18 hours ago)<p>Here are the facts:<p><pre><code>    * I ran some stress-tests last night.    
    * I forgot to reset the logs to minimal.
    * When I got this morning, I saw that hard drive is full /dev/sda1.
    * Cleaned up the large file (350GB).
    * I experienced the machine being a bit slowlier than usual.
    * I rebooted the machine.
</code></pre>
Since then, when I try to login, the computer shows as if it let me in, and yet, prompt for login again.<p>If I provide the wrong password on purpose, it shows the usual error. When I provide the right one, it is like an infinite loop.<p>When I hit Ctrl+Alt+F1 and login at tty1, for instance, all works fine.<p>From tty1, I tried to setup auto-login as follows:<p><pre><code>    sudo vim /etc/lightdm/lightdm.conf
    autologin-user=&#60;username&#62;
    autologin-user-timeout=0
</code></pre>
Yet, it doesn't perform the auto login for some reason.<p>I also tried `startx` from tt1, re-installed `gdm`, `lightdm` but with no help.
All I see is an error at /var/log/lightdm/lightdm.log that the process gdm-greeter get killed<p>[1] http://askubuntu.com/questions/256344/cannot-login-to-my-machine-using-the-right-password
[2] http://serverfault.com/questions/479126/cannot-login-to-my-machine-using-the-right-password
======
hosay123
So login succeeds but it kicks you out again immediately? Check /var/log to
ensure authentication succeeds. If it does, then something is broken with your
X session. Start reading from ~/.Xsession and work outwards. Try replacing
your homedir with an empty directory temporarily and see if the X session
succeeds. If it does, you know its something in a ~/.dot file, otherwise some
recent upgrade has probably broken some system package.

~~~
tzury
moving home dir shall have the same effect as creating new user and trying to
login with it, right?

anyway, I just posted, all logs at <https://gist.github.com/anonymous/4964986>

~~~
hosay123

        Failed to create random directory /tmp/pulse-CcctT9RwKSB1: Permission denied
    

Looks like something bad has happened to file permissions? As root, "chmod
4777 /tmp" and reboot. If a recursive chmod has gone awry and messed up
permissions everywhere, that might not be enough.

~~~
tzury
YOU SAVED MY DAY!

that chmod 4777 worked.

Thanks a million!

------
lutusp
> If I provide the wrong password on purpose, it shows the usual error. When I
> provide the right one, it is like an infinite loop.

Meaning what? Does it prompt for a login name and password again?

Have you tried to enter runlevel 1 and edit the system files? Runlevel 1
basically logs you in as root but without any login required.

If the above isn't practical. have you tried to boot from a bootable CD or DVD
and edit the system files from the CD/DVD hosted session?

~~~
tzury

        > Meaning what? Does it prompt for a login name and password again?
    

Yes. I get Password Incorrect message immediately. Unlike the other case,
which the the screens goes blank fore few seconds before I get the login again
without any error messages.

I can edit all my system files right now, either locally (on tty1) or from
remote using ssh. But have not idea which files I should be editing and to
which values.

~~~
lutusp
>> Meaning what? Does it prompt for a login name and password again?

> Yes. I get Password Incorrect message immediately.

So boot from a bootable CD or DVD and edit the system files to remove the
offending password. Detailed instructions:

[http://www.cyberciti.biz/tips/what-is-the-best-way-to-
edit-e...](http://www.cyberciti.biz/tips/what-is-the-best-way-to-edit-
etcpasswd-shadow-and-group-files.html)

Or, enter runlevel 1 and reset your password directly using "passwd". No
editing required in this case. Detailed instructions:

[http://www.debuntu.org/how-to-recover-root-password-under-
li...](http://www.debuntu.org/how-to-recover-root-password-under-linux-with-
single-user-mode/)

