1842192 Members
2225 Online
110188 Solutions
New Discussion

Problem with HOSTNAME

 
SOLVED
Go to solution
ALe_3
Frequent Advisor

Problem with HOSTNAME

Dear All,

I just installed a machine using a make_recovery of another machine. However the new machine still shows the name of the cloned machine (with hostname command) even if into file /etc/rc.config.d/netconf the name is correct.

The strange thing is that when I launch the command set_parms hostname it shows me the correct name and then, if I run again hostname command (after having launched the set_parms hostname) it shows the correct name.

But when I reboot the machine, it shows again the old name.

Can anyone help me?
7 REPLIES 7
Piergiacomo Perini
Trusted Contributor

Re: Problem with HOSTNAME

Hi ALe,

and when you type command

uname -a

what is the output?

Let's try and check also the file
/etc/issue.

HTH
regards
pg
ALe_3
Frequent Advisor

Re: Problem with HOSTNAME

It gives me the old/wrong name.....
melvyn burnard
Honored Contributor
Solution

Re: Problem with HOSTNAME

check you /etc/hosts file
Also make sure there is not a "backup" of the netconf file in /etc/rc.config.d/ that has the old hostname.
You may wish to run the set_parms without any options and set evertything again, but first remove the entries in hosts file, just to make sure.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Enrico P.
Honored Contributor

Re: Problem with HOSTNAME

Hi,
try to set the hostname with the command

uname -S

or with the command

hostname

Enrico
Enrico P.
Honored Contributor

Re: Problem with HOSTNAME

Also check in the /etc/rc.config.d directory if there is another file that have set the variable HOSTNAME:

grep HOSTNAME /etc/rc.config.d/*

Enrico
freddy_21
Respected Contributor

Re: Problem with HOSTNAME

please run
#set_parms hostname
type again your correct hostname, please not skip to type your correct hostname.

and reboot yout system.


Thanks
freddy
ALe_3
Frequent Advisor

Re: Problem with HOSTNAME

Melvyn was right, there was a netconf backup file that I deleted then I also cleaned up the hosts file and now everything is fine.

Thank you all for the help.

Regards
ALe