1820882 Members
3550 Online
109628 Solutions
New Discussion юеВ

Rename Server

 
SOLVED
Go to solution
Betty Hardin
Frequent Advisor

Rename Server

All of the servers in the organization that I work for were originally named after cartoon characters. We have a new IT boss who wants to change the name of all servers to reflect the type of machine - for example D380, D390, L3000, L2000, etc.

So that I don't miss anything; what are the required steps to change the server name? And where else might I look?

TIA
Betty
16 REPLIES 16
Leif Halvarsson_2
Honored Contributor

Re: Rename Server

Hi,
You can use two methods.
/sbin/set_parms hostname

or, manually editing the file
/etc/rc.config.d/netconf

You also may have to edit the file /etc/hosts manually
timmy b.
Honored Contributor

Re: Rename Server

Don't forget about your DNS server(s)!!
There are 10 kinds of people in this world: Those who understand Binary, and those who don't.
Torsten.
Acclaimed Contributor

Re: Rename Server

I would prefer the method

/sbin/set_parms hostname

(for hp-ux of course) and not edit the various files manually. This should be enough for the operating system. But be careful, some applications write the hostname in their own config files, so you have to reconfigure these applications also.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
DCE
Honored Contributor

Re: Rename Server

As the others stated, the best way is with the set_parms hostname command. You should also verify that tha appropriate changes are made in any of the following services, if you use them: DNS, NIS, NIS+ or LDAP. Also, (as stated by others) some applications have the hostname hard coded, so be prepared for some potential issues from the application area after the name change.
HGN
Honored Contributor

Re: Rename Server

Hi

To change the hostname you need to issue the command
- #/sbin/set_parms hostname
- also update the /etc/hosts file with the new host name
- the server will reboot when you execute the set_parms (will wait for you to answer yes)

- DNS needs to be updated also with the server name change to access the server using the name(FQDN)

Rgds

HGN
Fabio Ettore
Honored Contributor

Re: Rename Server

Hi,

/sbin/set_parms hostname

It is the best and cleaner method to change hostname.
Interested files are

/etc/rc.config.d/netconf
/etc/hosts

So you need to update DNS entries if you use DNS for resolution.

Good luck.

Best regards,
Fabio
WISH? IMPROVEMENT!
Michael Denney
Valued Contributor

Re: Rename Server

If you totally do away with the old server names, applications will probably stop working. Such as: An Oracle application on many PC's is installed and pointed to server MickeyMouse.

If MickyMouse no longer exists, you will have to change the configuration of the Oracle Application on every person PC.

Something to consider is using a C name canocal record in DNS to address this issue.

1. Change the host name of the server to D380(or whatever)
2. Change the A name record of that server's IP in DNS to D380
3. Then create a C name record in DNS, pointing MickeyMouse to D380 A name.

Betty Hardin
Frequent Advisor

Re: Rename Server

All of you are essentially telling me the same thing; and I've done that. Now, when I ping the server by the new name it sees it - and all apps are working fine.

Still have an issue:
When I ping the server by the old name - it is still pinging!!

We don't run DNS on these servers - DNS is managed by a windows box somewhere else on the network.

Any suggestions?
A. Clay Stephenson
Acclaimed Contributor

Re: Rename Server

This means that you have an alias defined somewhere.

If for example, in etc/hosts you have an entry like:

10.1.2.3 realname fakename

then either will work.

On the host that you are pinging from, do an nslookup oldname and that should tell you what source is being used for the hostname lookup. My cut at this would have been to define aliases (or canonical names) for the new names and leave the old names in place.
If it ain't broke, I can fix that.
Fabio Ettore
Honored Contributor

Re: Rename Server

Hi Betty,

as Clay posted it should be some alias in /etc/hosts. If you are sure DNS is not used on these servers then that should be the problem.

Betty, if suggestions of the ITRC people helped you please remember to assign points.

Post again if you gets problems yet.

HTH.

Best regards,
Fabio
WISH? IMPROVEMENT!
Devender Khatana
Honored Contributor

Re: Rename Server

Hi,

Can you see the contents of /etc/nsswitch.conf to find out what is being used to name resolution.

Another possibility is that you have not removed old entry from /etc/hosts & rather added a new entry with new name. If true put a # in the begining of the entry stating old hostname.

HTH,
Devender


Impossible itself mentions "I m possible"
vinod_25
Valued Contributor

Re: Rename Server

hi Betty

set_parms is the best way of renaming the servers...as that will guide you all way through...

All the best!!!


Vinod
vinod_25
Valued Contributor
Solution

Re: Rename Server

hi betty

do you use DNS to resolve this server name?

if yes, then you need to update the dns too...
as the DNS server will have the old name with same ip...

try nslookup
if you get some output like this:

xyz>nslookup xyz
Name Server: resolv.americas.abc.net
Address: 15.243.160.51

Trying DNS
Name: xyz.mayfield.abc.com
Address: 15.54.202.139

if the name got resolved in DNS like above then defenitely search your DNS server for the entry and update your new server name against the IP...

Thank your new IT BOSS... for all this R & D

Good Luck!!!

Vinod
vinod_25
Valued Contributor

Re: Rename Server

hi betty...

if you want to know whether you have any DNS server in the network...try...

more /etc/resolv.conf

if there is anything like nameserver entry is there then definitely your DNS is resolving your old name...

Try renaming /etc/resolv.conf and see...

mv /etc/resolv.conf /etc/resolv.old

if the old name is not getting pinged then be sure to trace the DNS thru resolv.conf entry and change it...

ALL THE BEST!!!

Vinod
Bill Hassell
Honored Contributor

Re: Rename Server

Just a note: DNS is a service provided by a wide variety of platforms, including Windows. You are definitely using DNS service if you have a file called: /etc/resolv.conf The first name or IP address in that file is where names will be translated into IP addresses. If you truly have no resolv.conf file, then everything is resolved in your hostfile.

Now it is really important to understand about names versus IP addresses. Networking knows nothing about hostnames--it is a crutch used by humans because IP addresses are a pain to remember. When you type ping snoopy, nothing is known about snoopy (or snoopy.peanuts.com), so a series of steps are run (on every computer platform) to translate this name into something useful.

Here's the key: if your server is named snoopy, it has NO effect on what you type on your PC or another box. snoopy has an IP address and that is how you wll connect to it. But on your PC, if you type ping snoopy, the IP address comes from your PC, not from the server. Where does your PC get the IP address? That is completely dependent on how your PC is configured. It may be looking in a Windows etc/hosts file (yes, there can be one on a PC, along with an lmhosts file), or it may be using a Windows WINS server or some other DNS server. The DOS command ipconfig /all will tell you.

So always ping with the IP address first. That should work because (I assume) you did not have to change the IP address. Now, before you ping by hostname, ask your PC what it thinks the IP address will be: nslookup snoopy. Then nslookup old_hostname. If your PC returns the same IP address, then you need to ask your network support people why this happens on your PC (insert whatever platform you're using).

So the key is: what is the IP address? Hostnames are just crutches provided by special programs, generally called DNS and WINS servers.

BTW: Big problems occur in mid-sized to large IT server farms when easy-to-remember names are replaced by "IT Standards". Models of computers change, even locations, so none of those well-thought-out nameing conventions works out for more than a few months. Sysadmins and DBAs will make a *LOT* more mistakes because l3kga6 is the new web server, not the Informix engine which is l2rr4nc. See how easy it is to chooes the right server when the names are so meaningful?

Seriously, using cartoon names actually promotes accuracy and makes the job more enjoyable. It's the nature of human beings (and computers don't one way or the other).


Bill Hassell, sysadmin
Betty Hardin
Frequent Advisor

Re: Rename Server

It's getting the DNS from a windows box.