I've heard some rumours about how this is done...haven't tried any of them myself, however. I guess that if your bootloader is password-protected (you can't go into the "edit" mode, or get command line) you're quite out of luck.
I don't remember exactly how the thing was done, but there were some methods like these:
1) using bootloader to get the filesystem mounted into a temporary place, say /mnt/ after which the file /etc/passwd (after mounting /mnt/etc/passwd) should be edited so that from the first line, the encrypted password part was to be removed. however, no other changes must be made, just the right part removed, and after rebooting the password should be able to be normally re-set....
2) somekind of single-user booting was used to access the system, after which the password was cleared with passwd command...this sounds too easy to my ears, though
so, I'm not sure. try google, it's got loads of pages I guess....anyway, there is no guarantee that any of the methods work, or that they'd even be safe, so watch out. plus, if your linux's security level is high, your bootloader's command prompt is password-protected and you don't have boot floppys, I'd say you've got problems..