Operating System - HP-UX
1855316 Members
27256 Online
104109 Solutions
New Discussion

Easy one! How do I change the domain name - HP-UX 10.20

 
James Pletcher
Occasional Advisor

Easy one! How do I change the domain name - HP-UX 10.20

Our company was merged with another to form a new company with its own new domain name. My HP-UX box still thinks in terms of the old domain name. How do I change what this box thinks is its domain so that sendmail functions use the new domain name?
Reputation is the kind of person people think you are, Character is the kind of person you REALLY are.
14 REPLIES 14
Helen French
Honored Contributor

Re: Easy one! How do I change the domain name - HP-UX 10.20

Hi,

Try this:

# domainname

This command will set or display the domain name for your server. See man pages for details.

HTH,
Shiju
Life is a promise, fulfill it!
Jeff Schussele
Honored Contributor

Re: Easy one! How do I change the domain name - HP-UX 10.20

Hi,

Use
set_parms hostname
and put in the fully qualified hostname
EX host.company.com
Then check the /etc/hosts file & make sure that it's correct in there - including aliases.
Then check /etc/rc.config.d & verify the hostname field there also. Edit as necessary.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jeff Schussele
Honored Contributor

Re: Easy one! How do I change the domain name - HP-UX 10.20

Sorry that should have been

/etc/rc.config.d/netconf

Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
MANOJ SRIVASTAVA
Honored Contributor

Re: Easy one! How do I change the domain name - HP-UX 10.20

Hi James,

You can try the following ways :

1.set_params hostname .
2 sam

Also ensure that the name is changed in DNS server if you are using that to resolve name externally .


Manoj Srivastava
Jeff Schussele
Honored Contributor

Re: Easy one! How do I change the domain name - HP-UX 10.20

Oh & don't forget to change in the /etc/resolv.conf file the
search domainname.com
line to the proper domain(s)so that short hostname searches will be appended with the proper domain name.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sachin Patel
Honored Contributor

Re: Easy one! How do I change the domain name - HP-UX 10.20

Hi James
#domainname is nis domain not a dns domain.

For dns domain you just have to change /etc/resolv.conf file or use sam or set_parms hostname

Sachin
Is photography a hobby or another way to spend $
pap
Respected Contributor

Re: Easy one! How do I change the domain name - HP-UX 10.20

Domain name can be changed by follwoing ways.

1. issue domainname command with desired domain name e.g for hp.com

# domainname hp.com


2. you can directly edit the file and specify domainname where NIS_DOMAINNAME variable present in file - /etc/rc.config.d/namesvrs

Thanks,
-pap

"Winners don't do different things , they do things differently"
Sachin Patel
Honored Contributor

Re: Easy one! How do I change the domain name - HP-UX 10.20

Hi Pap, Shiju
I am sure that domainname is nis domain name not a dns domainname.
Am I missing something?

Sachin
Is photography a hobby or another way to spend $
Jeff Schussele
Honored Contributor

Re: Easy one! How do I change the domain name - HP-UX 10.20

Nope, my pointy-hatted colleague - you are not.
domainname is NIS-specific.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
benoit Bruckert
Honored Contributor

Re: Easy one! How do I change the domain name - HP-UX 10.20

hmm !
The trouble seems to be on sendmail and not on the host.

Sometimes sendmail has in it's configuration the domain name.
In this case, edit /etc/sendmail.cf or /etc/mail/sendmail.cf in order to change Dj to your new domain name.
Then your emails will come with the new domain name.
Of course, if you know a little about sendmail, it's better to configure your sendmail.cf with m4 and your own sendmail.mc. Check in this file if the domain name is fixed ?

hope it may help

benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
Helen French
Honored Contributor

Re: Easy one! How do I change the domain name - HP-UX 10.20

Sachin:

'domainname' is NIS specific.

HTH,
Shiju
Life is a promise, fulfill it!
Sachin Patel
Honored Contributor

Re: Easy one! How do I change the domain name - HP-UX 10.20

OK. Then why people is telling this guy to change domainname using domainname command?

Sachin
Is photography a hobby or another way to spend $
benoit Bruckert
Honored Contributor

Re: Easy one! How do I change the domain name - HP-UX 10.20

James,
You should ask this question in the networking forum, because it may be solved in sendmail and not on the system.

regards
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
U.SivaKumar_2
Honored Contributor

Re: Easy one! How do I change the domain name - HP-UX 10.20

hi,
This is all needed for sendmail to work with
your new domain name.
edit /etc/resolv.conf
domainname "your_new_dns_domain"

edit /etc/sendmail.cf
1)append your new domain name with your hostname
in Cw macro.
eg:-
Cwlocalhost myhost.newdomain.com

2)
DL"your_new_domain"

eg:-
DLnewdomain.com
restart the sendmail.

regards,
U.SivaKumar


Innovations are made when conventions are broken