Select Go to Folder from the Finder's Go menu. Enter /etc in the popup field. Look for the "hosts" file. In order to edit the file you must be "root" and be using a graphic editor that can start with admin privileges. If not then you have to edit it using the Terminal application in the Utilities folder.
Open the Terminal and at the prompt enter:
sudo pico /etc/hosts
Enter your admin password when prompted. It won't be echoed.
Edit the file and use the onscreen info on how to exit and save the edited file.
Not sure if this is what you mean. Here are the instructions from Apple on changing user short name or home directory name. I've used this on a couple of usedMacBooks I've bought on eBay.