1747983 Members
4377 Online
108756 Solutions
New Discussion юеВ

hostname error

 
May_3
Advisor

hostname error

Hi,
The hostname I configured in /etc/hosts and /etc/rc.config.d/netconf is hpd380, but when (in command line) I run the command 'hostname' the retured value is d380 and I can not login to CDE, any ideas about this problem?
May
17 REPLIES 17
Sridhar Bhaskarla
Honored Contributor

Re: hostname error

You can set it back to hpd380 by executing the command

#hostname hpd380


This should fix your CDE problem.

Now to check if your netconf is working properly or not, try

#/sbin/init.d/hostname start
#hostname

if this returns again d380, then you need to re-verify your entry in /etc/rc.config.d/netconf.


-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Dayanand Naik
Frequent Advisor

Re: hostname error

Hi May,

1) you can edit the /etc/rc.config/netconf file and change the hostname value and the stop inetd services by /sbin/init.d/inetd stop and start from the shell command

2) else you can execute /sbin/set_parms hostname command which will allow you to modify the system name.

Hope that helps..

Regards,
Dayanand Naik.
Dayanand Naik
May_3
Advisor

Re: hostname error

Hi,Sridhar
I have verified that the entry in the /etc/rc.config.d/netconf is hpd380 and when I tried
#hostname hpd380
#/sbin/init.d/hostname start
#hostname
it retured d380 again, any further advise?
thank you for your reply.
May
May_3
Advisor

Re: hostname error

Hi,Dayanand
1)I tried
#/sbin/init.d/inetd stop
#/sbin/init.d/inetd start
#hostname
the retured value is d380
2)When I tried set_parms hostname, the hostname indicated that the hostname has already been set to hpd380
what should I do next?
May
Animesh Chakraborty
Honored Contributor

Re: hostname error

Hi May,
What is the output of uname -a ?
try uname -S hpd380



best of luck
Animesh
Did you take a backup?
Sridhar Bhaskarla
Honored Contributor

Re: hostname error

May,

Please do the following and see what you get

#hostname hpd380
#hostname
You should get hpd380 here.

Make sure that the entry in /etc/rc.config.d/netconf is correct and there are no duplicate entrees for HOSTNAME in that file.

HOSTNAME="hpd380"

/sbin/init.d basically does the same thing that we do at the command prompt. I can't think of any reason why it wouldn't set to hpd380 if it is properly specified in your netconf file.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
May_3
Advisor

Re: hostname error

Hi,animesh
The output of "uname -a" is as follows:
HP-UX hpd380 B.11.00 A 9000/810 2001361887 two-user license
When I tried
#hostname
it retured d380 again


May
Sridhar Bhaskarla
Honored Contributor

Re: hostname error

May,

It's very interesting. Let's double check if the hostname command works properly.

#hostname hpd380
#hostname

what's the output you are getting?.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Animesh Chakraborty
Honored Contributor

Re: hostname error

Hi may,
can you ping hpd380 from other server
using hpd380 hostname ?
ping hpd380.
try rebooting the server once.
"man hostname" may help you


best of luck
animesh
Did you take a backup?