I have a Raspberry Pi running raspbian that I can no longer login to. I have been using the "pi" user without any problems up to this point. However, when it asks for a login and I input "pi", I get an error that says "Login Incorrect" and am asked for a login again. This happens at the command line as I was working on setting it up as a headless file server.
This doesn't happen if I give it the username "root". If I try to login as "root", it asks for a password but no password seems to work. I tried looking up the default "root" password and found that the "root" user is not enabled on the pi.
Strangely, if I try to access the pi via ssh (using PuTTY), I can login as the user "pi". However, as soon as I do the connection is broken with the error: "Server unexpectedly closed network connection".
What could be happening to cause this? Do I have any way of fixing the problem if I can't login?
Some background as to what might have caused this:
I was working on setting up Deluge with it's Web UI. However, deluge doesn't have init scripts so I was following this guide to create the init scripts. My pi didn't have "systemctl" installed so I started following this guide to install "systemctl". I had a problem after editing "/boot/cmdline.txt" which caused my pi to boot into safe mode. I removed my edits and the pi booted normally again.
I don't know if any of my above attempts could have caused my login problems but essentially the only thing I was doing was trying to setup deluge when I stopped being able to login.