1) In most cases, /tmp should still have space left. it's a virtual FS. For all I care, do a "tail -1000 $file > /tmp/baka" and move /tmp/baka over the original file :) I dunno... Just guessing here. There should be a nicer way, like using VI in command mode from the CLI. Telling it to "dd" the first X lines, followed by a ":wq" :)
2) Boot from CD/DVD, manually mount /, kill the password in /etc/shadow