On my laptop, I forgot the password to my Ubuntu partition, so I logged into the root command shell on the recovery start up option in GRUB so that I could change the password.
On my first attempt to change my user password, I got this error:
root@username-PC:~# passwd username (*not my actual user name*) Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged
After doing some research, I discovered that I was stuck as read only on the file system, so I ran the following command to remount the file partition as read/write:
mount -rw -o remount /
Afterwards, I change my user password using
passwd and it was changed successfully.
I restarted my laptop and tried to login using the new password but the only thing that happened was after entering my password it flashed to a black screen with some text that I couldn't make out except for "Ubuntu 12.04" then another black screen half a second later, and finally back to the login screen. Repeated attempts to login results in only this action.