1847920 Members
3764 Online
104021 Solutions
New Discussion

Domainname

 
JAIKISHAN.B.SAMBHWANI
Occasional Contributor

Domainname

Can Some one help me Where to store the Domainname so that it will be permanent
Only domainname and value is not permanent.
My OS is HP-UX 11.00
Resolve.conf all has first line domainname
Second line nameserver
my hosts file allso has full name
for eg a.b.com
when i give hostname or uname -a it just diaplay the host name.

Regards,

Jaikishan
6 REPLIES 6
John Palmer
Honored Contributor

Re: Domainname

hostname is set from file
/etc/rc.config.d/netconf

Edit this file and look for the line
HOSTNAME=""

You can change the current hostname until the next reboot from a root session by typing
hostname .

Regards,

John
James R. Ferguson
Acclaimed Contributor

Re: Domainname

Hi:

If I understand your post correctly, you are seeing the espected behavior of the hotname and/or uname commands. Try nslookup using your hostname.

...JRF...
CHRIS_ANORUO
Honored Contributor

Re: Domainname

You can set these parameters also through SAM->Networking and Communications
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
JAIKISHAN.B.SAMBHWANI
Occasional Contributor

Re: Domainname

Thanx Friends
But my Ques is
when i am seting my domainname with the command it gets sated say
domainname yyy.com
but after reboot this disappeared
how to make this permanent
give me in detail which files i have to update
Shannon Petry
Honored Contributor

Re: Domainname

The command "domainname" is used in reference to an NIS domainname. If you are running NIS, then you need this, and should set it in "/etc/rc.config.d/namesvrs" along with NIS_CLIENT=, NIS_SLAVE=, NIS_MASTER=, etc. where 0 is off and 1 is on. There are also a few other niceties for NIS such as ypbind options, yppasswd options for servers, etc.
I do not think however you are using NIS, so just avoid using the command "domainname". If you are writing a script or something based on your DNS domain name, parse the "/etc/resolv.conf" file for the domain name.

Best Regards!
Shannon
Microsoft. When do you want a virus today?
James R. Ferguson
Acclaimed Contributor

Re: Domainname

Hi:

If you are referring to NIS, then the domain name is configured in /etc/rc.config.d/namesvrs using the variable NIS_DOMAIN.

If you are referring to BIND, then the domain name is configured in /etc/resolv.conf as an entry like "domain myplace.anywhere.com"

Be sure to specify the service order the various names services will query for host information. This is done in the /etc/nsswitch.conf file.

The default order for the nsswitch file is DNS (BIND), NIS, and then FILES (/etc/hosts).
Use the nslookup command to see how your nsswitch file is interpreting queries.

...JRF...