Operating System - HP-UX
1832973 Members
2594 Online
110048 Solutions
New Discussion

Re: A simple question regarding HP-UX and domain name

 
James Pletcher
Occasional Advisor

A simple question regarding HP-UX and domain name

I have "inherited" a UNIX box (10.20) to administer. We use sendmail, mailx, and elm for some "notifications". This is not our "mail server". We merged with another company, changed our name, and now I need to make my box think it's companyY.com instead of companyX.com when dealing with the network and SMPT. This is just one of many, many servers, not one of main guys.
Reputation is the kind of person people think you are, Character is the kind of person you REALLY are.
5 REPLIES 5
Ken Hubnik_2
Honored Contributor

Re: A simple question regarding HP-UX and domain name

You can change the domain name for an HPUX server by using set_parms addl_netwrk
John Dvorchak
Honored Contributor

Re: A simple question regarding HP-UX and domain name

Or if you want to play with it a little, just edit the /etc/hosts file and change the FQDN name. Also if you used dns and the /etc/resolv.conf has a domain entry you will also change it there. The resolv.conf file is for name lookup and sendmail gets the name from /etc/hosts. You should probably also look at /etc/mail/sendmail.cf and look for the Dj variable. This is usually only set if the machine can't figure out it's own domain name. It is normally left commented out.
If it has wheels or a skirt, you can't afford it.
Jeff Schussele
Honored Contributor

Re: A simple question regarding HP-UX and domain name

Hi James,

A few places to look:

1) /etc/hosts We use the shortname first in the hosts file & then the FQDN as an alias - Example

111.222.111.222 host1 host1.company.com

You may have to edit a LOT of hostnames in here if they did the same.

2) /etc/rc.config.d/netconf Look for the HOSTNAME= field. Some people use the FQDN there. Although one should just use the shortname.

3) /etc/resolv.conf Look for the search line

search subnet1.company.com subnet2.company.com

Generally one will want to search their OWN domain first before they search outside.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Steven E. Protter
Exalted Contributor

Re: A simple question regarding HP-UX and domain name

You can change the domain name another way:

/etc/rc.config.d/netconf

You can actually use a fully qualified domain name there.

server becomes server.your.net

or whatever.

You'll need to coordiante with /etc/hosts and /etc/nsswitch.conf

If it supports it, you might want to consider an OS upgrade to maintain support.

Good luck.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Michael Steele_2
Honored Contributor

Re: A simple question regarding HP-UX and domain name

May I suggest something that doesn't require a reboot: The Sendmail masquerade macro?

Masquerading allows all email being sent out from any HP-UX server to assume any domain that you choose to represent. I've had to use it in similar situations to what you're experiencing. Refer to 'DM' in the /etc/mail/sendmail.cf file.

# who I masquerade as
DMchemfirst.com
Support Fatherhood - Stop Family Law