It would be helpful if you could say what it was you typed into the terminal.
It sounds like you are still able to use terminal as root so maybe try running diskutil repairPermissions /
(I'm a windows guy and not very strong at mac, so i would verify if that's a good idea before you...