I have a serious problem with my Mac - I don't need to enter my password to login but when I need to edit a file using the vi editor I have to enter the password. I don't remember the password - is it possible to recover it?
From the Mac Help, when searching for "forgot password":
If you forget your administrator password
If you don’t remember your administrator password, you can reset it using the Mac OS X installation disc.
To reset the administrator password using the Mac OS X installation disc:
Insert the Mac OS X installation disc into your computer’s optical drive (or an optical drive connected to your computer), and then double-click the Install Mac OS X icon.
In the Installer, click Utilities, and then click Restart.
When the Language Chooser appears, select your language, and then click the Continue button (looks like an arrow).
In the Installer, choose Utilities > Reset Password.
Follow the onscreen instructions to change the password.