If you typed those lines as that, first problem was with mount -ow.
Second, if there was a space in
rm /var/ db .AppleSetyupDone
before db, basically the way the system read that command was rm /var/
Back to the initial problem, reseting the password - that's done differently.
Get the install discs that came with that Mac, OR if it has a later OS than it was shipped with (if it shipped with 10.5 and you have now 10.6 or similar) then the discs of that later OS, restart the Mac from the disc (alt, or C at boot).
Select from the install menu the option to reset the password.
To get back /var/ that you removed with the command line acrobatics above, get the install discs and do an archive&install. Manually creating a /var/ would not do the trick to get everything back there in a working order.