I took this from Mirjams blog. I have verified that it works. I am adding it here so that I can find it when I need it, and as I mentioned, it works great.
Renaming a WSS3 or MOSS server requires very specific tasks in a specific order. If you don’t follow the following instructions precisely, the chances are that you may need to reconfigure your whole MOSS environment.
Here are the steps to take, and the order in which to take them if you want to rename a server that has WSS3 or MOSS already installed and configured on it:
*** NOTE: Use only letters, digits and minus for the machine name (so no underscores), max 15 characters.
- Change each alternate access mapping for your WSS3 or MOSS deployment in Central Administration:
- Open Central Administration, “Operations” Tab, “Alternate access mappings” link
- Modify each mapping item to reflect your newly chosen server name
- Use stsadm.exe to invoke the “renameserver” command option:
- Open a command prompt window
- cd “C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN”
- stsadm -o renameserver -newservername -oldservername
- Rename your Server via Change Name Operation in Windows Server 2003:
- Start Menu | Control Panel | System, “Computer Name” tab, “Change” button.
- Input your new server name
- Reboot the server NOW.
- Update the MOSS farm creadentials
- After reboot, open command prompt
- cd C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN
- stsadm -o updatefarmcredentials -userlogin -password
- iisreset /noforce
- Check all application pool identities in IIS, update where the old machine name is still there.
- If you already have a search index drop this, and rebuild it
- Congratulations, your server is now renamed.