[plug] Hostname change - why NISDOMAIN?

Leon Brooks leon at brooks.smileys.net
Thu Apr 27 15:28:05 WST 2000

Ian Kent wrote:
> I can't see how the NIS domain name is related to the hostname or for that
> matter DNS.

> NISDOMAIN is not used in setting the hostname or the DNS domain name on a
> Redhat system.

Not in theory.

> I believe to change the hostame of a Redhat system you need to change the
> HOSTNAME= and possibly the DOMAINNAME= in /etc/sysconfig/network and
> restart your system.

> The DOMAINNAME variable is set by config. programs but not actually used at
> system startup (as far as I can see).

Likewise - however, NISDOMAIN _is_ used by startup: it is used to set
the domainname, which I why I recommended changing it - this code
snippet is from /etc/rc.d/rc.sysinit :

    # Set the NIS domain name
    if [ -n "$NISDOMAIN" ]; then
        action "Setting NIS domain name $NISDOMAIN" domainname
        domainname ""

This is from a Mandrake install, but I first noticed the effect on a
RedHat install.


If at first you don't succeed, try a shorter bungee.

More information about the plug mailing list