I have a problem that I need help with. However, I'll start by saying I did something very stupid (granted?). Here is was I did, and why I did it.
I'm running a apache/php server on ubuntu. I only have one user account for logging into said computer. The apache/php server runs as the user w-w-w-data. Whenever I would create a file or directory in the web server dir, I would go back and chown -R w-w-w-data:w-w-w-data /var/w-w-w. Well, I got tired of this, so I sudo vi |etc|passwd, and change my user login account (tod:1000:1000
etc)) to tod:33:1000
etc), 33 being the id for w-w-w-data. Well... needless to say... that was my stupid mistake... now I'm stuck trying to figure out how to undo this, as I can no longer sudo vi /etc/passwd, as my console says "www-data@servername", or if instead of ssh-ing in, I go to the actual computer, it shows 'I have no name!@servername', I suspect this is because I haven't logged out since I made this change.
Anyways, sudo doesn't take my password. I don't know the root password, because of ubuntu's default setup. Is there any way to fix this? Maybe with a live cd or something? Thanks.