[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: proper way to change ip and hostname



I think everyone should probably look at Dave Ewart's response. I tend to agree with him now that I've seen it in action.

dpkg-reconfigure etherconf

the only difference from etherconf and the sarge installer is that the sarge installer puts some guesses into the fields for you first. The only other difference I could see is that etherconf puts the FQDN in /etc/hostname rather than just the host name.

----- Original Message ----- From: "Brian Kimball" <bk@bk.cx>
To: <debian-user@lists.debian.org>
Sent: Tuesday, July 26, 2005 3:12 PM
Subject: Re: proper way to change ip and hostname


Matthew Lenz wrote:
rather than grep xarging /etc for occurances of the ip and hostname
is there a proper "debian way" of changing them?

Others have already led you in the right direction.  To summarize:

1) change IP address: edit interface information
in /etc/network/interfaces

2) change hostname: edit /etc/hostname and /etc/hosts

3) update nameserver information in /etc/resolv.conf
or /etc/network/interfaces if you use the resolvconf package.

But that only handles the bare minimum.  You will also need to
reconfigure any software that has your old hostname, IP address,
netmask, network address, etc., hardcoded in its config files.  In this
case grepping everything in /etc is the only sure-fire way to remember
what needs to be changed and what doesn't.

Note the above: you need to grep for more than just your IP address and
hostname.  For example, I run the cups printing service and have the
statement "Allow From 64.172.171.64/29" in cupsd.conf which allows
network printing from all my other IP addresses.  Grepping for any one
of my IP addresses (.65, .66, .67, .68, .69) would not have reminded me
that I need to change that statement to my new settings.

So, in short, grepping /etc _is_ the "proper" way.  It feels brute force
but it isn't really.  In fact, it helps you learn your system.  Someone
else mentioned that when they were in a similar sitation they were told
to reinstall.  BLECH!!  That's gross.  _That_ would be improper.

hth,

     brian


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




Reply to: