Re: Changing hostname

From: * Tong* (sun_tong_001_at_yahoo.com)
Date: 07/13/04

  • Next message: Scott Thompson: "RE: Occasional freezing / need help diagnosing"
    To: debian-user@lists.debian.org
    Date: Tue, 13 Jul 2004 13:29:11 -0400
    
    

    Thanks everyone for the reply.

    I can say that changing the hostname, though seems simple, is the
    most convoluted part in Linux. As expressed by Kent West:

    ,-----
    | there may be several places in the /etc directory where it is
    | specified in various config files, such as /etc/hosts. There may
    | be a squid config file that needs changing also. You might want to
    | run something like "grep -r -n cxmr /etc" to find all the
    | locations where the filename is used.
    `-----

    In RedHat, when using linuxconf, all the following files have been
    changed. I checked *every one of them* before posting my question.

     /etc/hosts
     /etc/sysconfig/network-scripts/ifcfg-eth0
     /etc/sysconfig/network
     /etc/conf.modules
     /etc/conf.linuxconf
     /etc/HOSTNAME
     /etc/networks

    Micha Feigin's comment seems to be the most professional to me:

    ,-----
    | first thing, you host name is merely cxmr. dyndns.org is your
    | domain name, not part of your hostname. That should appear in the
    | domain directive in your /etc/resolv.conf if you want.
    `-----

    However, this approach doesn't seem to be necessary to me:

    $ cat /etc/hostname
    cxmr.dyndns.org

    $ cat /etc/resolv.conf
    search
    nameserver 24....
    nameserver 24....

    $ hostname
    cxmr.dyndns.org

    $ hostname --fqdn
    cxmr.dyndns.org

    $ dnsdomainname
    dyndns.org

    You see, everything seems to be fine. (!?)

    Paul Johnson's comment makes me think that changing the hostname
    is far from simple:

    ,-----
    | > 127.0.0.1 cxmr.dyndns.org localhost
    |
    | 127.0.0.1 localhost
    | <your-ip> cxmr.dyndns.org cxmr
    `-----

    That's actually what I want to do. I.e., I want my FQDN reflects
    my real IP address, not localhost, but that seems impossible,
    because I'm getting a new IP every time I reboot.

    Any comments? Thanks

    Tong

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Scott Thompson: "RE: Occasional freezing / need help diagnosing"

    Relevant Pages

    • Re: proper way to change ip and hostname
      ... > reconfigure any software that has your old hostname, IP address, ... > netmask, network address, etc., hardcoded in its config files. ... tradition and Debian configuration tools should be consistent. ...
      (Debian-User)
    • Re: cloning system
      ... > I have cloned a solaris system running a proxy application (restored ... > from backup) to another one so that all config files etc are the same. ... > The hostname and ip appear in a lot of configuration files. ... manually change the hostname in following files and reboot: ...
      (comp.unix.admin)
    • cloning system
      ... I have cloned a solaris system running a proxy application (restored ... from backup) to another one so that all config files etc are the same. ... The hostname and ip appear in a lot of configuration files. ... search ascii or text files only? ...
      (comp.unix.admin)
    • Re: SSL key file with FC6
      ... The certificate should match the address that you access the server by. ... Well, the "hostname" returns mail, but the rDNS for eth0 on this ... which seems to be what most config files ...
      (Fedora)
    • Re: (was Re: setting FQDN in /etc/hosts)
      ... There should be a space before the word localhost, ... the hostname command will tell you what ... 503 Leafnode must have a unique fully-qualified domain name. ... ## This is the NNTP server leafnode fetches its news from. ...
      (news.software.readers)