There are multiple things that could cause this issue.
For the first one, the notorious, but (sometimes) helpful
If you have run terminal, and used
chown to attempt to fix a system error, such as
sudo not running due to it not being 'run as root' on an administrator account, you may have royally screwed over your PC. Yea, I did that exact thing once. I had to back up my files and wipe the disk.
And second on the list is attempting to change the user ID. This will mangle your PC's filesystem, and also require either a $250 PC repair bill, or another system wipe.
Last but not least, think, have you downloaded ANY programs from the internet? If so, what are they? There aren't many 'viruses', so to speak, for macs (yet), however, during a package installation, when it says 'Running Scripts', that may also mean 'Running
chown and changing system files to the point of corruption', or even one of the many other destructive commands.
The third is more than likely the cause of your problems, as most users of any PC run into problems just by downloading a 'clean looking' program. 7 system wipes later, I still haven't learned that... ANYhoo, I hope your problem is solvable without wiping the system!
In the case that any of these did happen, the first thing to do would be to run disk utility from the launchpad, click on 'Macintosh HD' or whatever your drive name is, then click 'repair disk permissions'. If this doesn't help, you may be in for a system wipe, unless either you can fix it, or you pay a professional to fix it.