Operating System - HP-UX
1833587 Members
3915 Online
110061 Solutions
New Discussion

Re: How to set my domainname?

 
Yogeeraj_1
Honored Contributor

How to set my domainname?

Hello experts,

a simple question.

How do i set my domain name?

i have observed that when i set my domain and hostname using the command line and restart the server at a later stage i lose the settings.

E.g.
# domainname

# hostname
L1000

i guess these values should be set in some configuration files.

(in linux, i recall having modified /etc/sysconfig/network)

i am running HP-UX 11

Thank you for a reply.

Best Regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
22 REPLIES 22
Emiel van Grinsven
Valued Contributor

Re: How to set my domainname?

Hi,

modify /etc/hosts.

HTH, E.
Clemens van Everdingen
Honored Contributor

Re: How to set my domainname?

Hi,

run set_parms addl_netwrk

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Rainer von Bongartz
Honored Contributor

Re: How to set my domainname?

you can use domainname to set or display your domainname

so domainname
will set this parameter

Regards

Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Emiel van Grinsven
Valued Contributor

Re: How to set my domainname?

Hmm, it seems I wasn't thinking.
You should use
#> domainname

see manpages for syntax.

Grt, E.
U.SivaKumar_2
Honored Contributor

Re: How to set my domainname?

hi,
if you want to set your domainname permanently to exist even after system reboot do this
put the domainname for DNS in the configuration file /etc/rc.config.d/namesvrs
regards,
U.SivaKumar
Innovations are made when conventions are broken
CHRIS_ANORUO
Honored Contributor

Re: How to set my domainname?

Hello,

Go through SAM->Network->etc
You can set up the doamin name and copy nss* files or update them in /etc
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Yogeeraj_1
Honored Contributor

Re: How to set my domainname?

hello all,

thank you the fast reply!

i did use the domainname command to set my Domain Name ;)

But, when i restarted the server it was gone!!
Why?

please..

Regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Emiel van Grinsven
Valued Contributor

Re: How to set my domainname?

Hi,

the domainname is set at boottime.
The domain name is usually
set in the configuration file /etc/rc.config.d/namesvrs, by setting
the NIS_DOMAIN variable.

HTH, EMiel
Marc Dijkstra
Trusted Contributor

Re: How to set my domainname?

Degambur

I assume you are talking about the BIND domain name?

Are you registered in the appropriate xxxxx.mu domain as l1000? Once this is ascertained the domain name and DNS is kept in the /etc/resolv.conf file (forward and reverse lookup zones), this is set simply by running set_parms addl_netwrk. If you are having the typical sendmail errors jumping up the screen and you do not necessarily need to be in a domain, then you can put a dummy entry as an alias in your /etc/hosts file.

Regards
MND
"A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila"
U.SivaKumar_2
Honored Contributor

Re: How to set my domainname?

hi,
if u set domain name by domainname command and reboot you will lose the domainname setting.
edit /etc/rc.config.d/namesvr and put your domain name there.
Also for dns
edit /etc/resolv.conf
domain "yourdomainname"
nameserver "yournameserver"
regards,
U.SivaKumar
Innovations are made when conventions are broken
Clemens van Everdingen
Honored Contributor

Re: How to set my domainname?

Hi,

Still keeping up with my first remark.

set_parms addl_netwrk ...... should do the trick.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Marcin Wicinski
Trusted Contributor

Re: How to set my domainname?

Hi,
domainname is used only while NIS is configured. If you do not need NIS you can set domain name in: /etc/hosts and /etc/resolv.conf files (in resolv.conf you have to write: domain )

Later,
Marcin Wicinski
Yogeeraj_1
Honored Contributor

Re: How to set my domainname?

Hello Mr. U.SivaKumar,

Thank you for your reply.

i went through the /etc/rc.config.d/namesvrs

my NIS_DOMAIN is blank!

is this the only value that should be set?
how do i activate it after the modification?

thank you again for a reply

Regards
Yogeeraj
==============================================
L1000: sbin>more /etc/rc.config.d/namesvrs
unset UNIX95
PRE_U95=true;export PRE_U95;

##############################################
# named (BIND) configuration. See named(1m). #
##############################################
#
# Name server using the Domain Name System (DNS) protocol (RFC 1034/1035)
#
# NAMED: Set to 1 to start nameserver daemon.
# NAMED_ARGS: Arguments to the nameserver daemon
#
# Configuration of a named boot file (e.g. /etc/named.boot) is needed for
# successful operation of the name server.
#
NAMED=0
NAMED_ARGS=""


##########################################################
# NIS (YP) configuration. See domainname(1), ypserv(1m) #
##########################################################
#
# Name server using Network Information Service protocol (Sun's ONC)
#
# NIS_MASTER_SERVER: 1 if this node is the master NIS server, 0 if not.
# NIS_SLAVE_SERVER: 1 if this node is a slave NIS server, 0 if not.
# NIS_CLIENT: 1 if this node is a NIS client, 0 if not.
# NISPLUS_SERVER: 1 if this node is a NIS+ server, 0 if not.
# NISPLUS_CLIENT: 1 if this node is a NIS+ client, 0 if not.
# EMULYP: -Y to have rpc.nisd support YP clients.
# NISDOMAIN: the NIS domain name (see domainname(1)).
# NISDOMAIN_ERR: ???
# MAX_NISCHECKS= max number of bind attempts the NIS client will make
# YPSERV_OPTIONS command line options for ypserv
# YPBIND_OPTIONS command line options for ypbind
# YPPASSWDD_OPTIONS command line options for yppasswdd
# KEYSERV_OPTIONS command line options for keyserv
# YPUPDATED_OPTIONS command line options for ypupdated
# YPXFRD_OPTIONS command line options for ypxfrd
# RPC_NISD_OPTIONS command line options for rpc.nisd
# NIS_CACHEMGR_OPTIONS command line options for nis_cachemgr
# YPSET_ADDR IP addr or name of NIS server. Must set YPBIND_OPTIONS
# to "-ypset"
#
# Note: - NIS_MASTER_SERVER and NIS_SLAVE_SERVER are mutually exclusive,
# i.e., only one, not both, should be set if either is set.
# - All NIS servers must also be NIS clients, so if you set either
# NIS_MASTER_SERVER or NIS_SLAVE_SERVER to 1, you should set
# NIS_CLIENT to 1, too.
# - Refer to NFS administration manual and ypinit(1M) for the
# steps required to create NIS servers.
#
# MAX_NISCHECKS
# The maximum number of bind attempts the
# NIS client will make for a NIS server to be
# available before shuting down NIS and
# booting without it. This value should
# not be less than 2.
#
NIS_MASTER_SERVER=0
NIS_SLAVE_SERVER=0
NIS_CLIENT=0
NISPLUS_SERVER=0
NISPLUS_CLIENT=0
NIS_DOMAIN=
MAX_NISCHECKS=2
EMULYP=""
YPSERV_OPTIONS=""
YPBIND_OPTIONS=""
YPPASSWDD_OPTIONS="/etc/passwd -m passwd PWFILE=/etc/passwd"
KEYSERV_OPTIONS=""
YPUPDATED_OPTIONS=""
YPXFRD_OPTIONS=""
RPC_NISD_OPTIONS="$EMULYP"
NIS_CACHEMGR_OPTIONS=""
YPSET_ADDR=""
L1000: sbin>

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Clemens van Everdingen
Honored Contributor

Re: How to set my domainname?

Hi,

use set_parms because this is filling all the files correctly and makes no accidental editing mistakes.
After that al works fine.
All Marcin gave are coorect as well.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
U.SivaKumar_2
Honored Contributor

Re: How to set my domainname?

hi,

NIS_DOMAIN=example.domain.co.in.

put your own domain

regards,
U.SivaKumar


Innovations are made when conventions are broken
Yogeeraj_1
Honored Contributor

Re: How to set my domainname?

hello everybody,
thank you all for having contributed.

As far as what i recall, i don't have NIS configured on my Box. (Marc Dijkstra and Marcin Wicinski)

i think i'll get the correct command for:
set_parms addl_netwrk

(
L1000: sbin>man set_parms
No manual entry for set_parms.
)

and try it.

i am closing this and will be assigning points shortly..sorry if i make some of you unhappy.... ;)

Best Regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
U.SivaKumar_2
Honored Contributor

Re: How to set my domainname?

hi,

For set_parms man page
try this
#man 1m set_parms


addl_netwrk :

Allows the user to set the subnet mask, which defines the network and local portions of a network address, the default routing gateway, and define access to the Domain Name System (DNS) and Network Information service. A reboot is required for everything to take effect in the non-first-boot case.

regards,
U.SivaKumar

Innovations are made when conventions are broken
Emiel van Grinsven
Valued Contributor

Re: How to set my domainname?

Hi,

When you give the command it's interactive. No need for manpages I think ...

just try it, you can always stop without making changes

E.
Clemens van Everdingen
Honored Contributor

Re: How to set my domainname?

Hi,

By assigning point I should become clear what the magic answer was !

Is set_parms addl_netwrk teh command you used or was it something else ?

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
pap
Respected Contributor

Re: How to set my domainname?

Hi,
1.
For modifying hostname you need to edit the file /etc/rc.config.d/netconf and specify the hostname where the HOSTNAME variable is.

2. For modifying domainmae you need to edit the file /etc/rc.config.d/namesvrs file and type the domain name where your NIS_DOMAIN variable is.


Thanks,
-pap
"Winners don't do different things , they do things differently"
Jeff Schussele
Honored Contributor

Re: How to set my domainname?

Hi Yogerraj,

The domain name - if NOT using NIS - is set in the /etc/rc.config.d/netconf file (use fully qualified name EX host.domain.com) AND in the /etc/hosts file.
Either use the fully qualified name as the hostname & the short name for an alias or vice-versa in the /etc/hosts file.

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

Re: How to set my domainname?

hi,
set_parms addl_network
command ultimately updates /etc/rc.config.d/namesvr file only.

regards,
U.SivaKumar
Innovations are made when conventions are broken