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

Re: changing hostname



On Fri, Jun 22, 2001 at 10:31:51AM +0200, Adri wrote:
> I changed my /etc/hostname from debianAdriano to Adriano
> 
> That's because I'd like to bring my debian under the Windows domain of the 
> company.

If you have to deal with those types of circumstances, try to go the easy
way: get a second peecee.  bring an old one from home if you have to.
But corporate outfits typically have stacks of "old" pentiums gathering
dust in cupboards anyway.  95% of your typical technical and political
problems simply evaporate.  That way, linux isn't in your way when
you have to deal with corporate standard "mail" systems, clueless or
overworked it departments and stupid bosses.  And windows will not be
in the way of linux, so you can grow some uptime.

You do not even need an extra network port or even ip address.  Just get
yourself an second network card for the linux machine and a cross cable
(or a regular one and a hub).  A netcard costs 10 euro/$ in the shop,
so it's really wasteful to try to obtain one per corporate purchasing
procedure standards. :-P

Put the linux machine on the corporate network, with the proper ip
and setup an rfc network (192.168.x.y/24) on the other network card.
Put the other machine on the rfc network.  Setup ip forwarding and ip
masquerading ("apt-get ipmasq").  In rare cases you may have to add some
port forwarding as well, but this is quite unlikely te be necessary.
If you think you may need this (because some things stop working for
the windows machine - if it works fine you don't need this) you can 
easily setup an ipchains rule to log all incoming packets on the outside
interface with SYN flag set.  Then watch the syslog.

Before you start to seriously hook up things, be careful to run "netstat
-atp" on the linux machine.  This shows what services are listening to
the network.  You want as few as possible, to avoid any problems with the
people responsible for the corporate network (see it from their side too).
Be careful not to become a trojan horse vector or underground mp3 site.
Even be careful not to become an embarassment to the network admins just
because your stuff _is_ always up. :-)

This doesn't have to be a high-profile endeavour.  Your linux box needs no
monitor or keyboard attached.  If you set it up correctly, you can even
put the console on the serial port and use windows hyperterminal program
to access the console.  Even lilo supports it (now only if those #%^$
peecee bios designers got a clue too).  But that is not really necessary,
just nice to play with.  Plugging over a few cables now and then isn't
so bad anyway.  But IMHO it is still nicer (and less noisy!) if you can
put the machine away in a cupboard.

What you do want to have is ssh installed on the linux machine and if
you have to use a windows console (because it's just a lot harder to
do it the other way around) be sure that the first thing you do is to
install the putty program.  It is a neat little ssh client for windows
and it is Free Software.  Get it from Simon Tatham's page @
 http://www.chiark.greenend.org.uk/~sgtatham

> I should entry a new row in the domain master for the linux hostname.
> 
> Since I'm yet there with the name Adriano, I could be in the domain 
> indefferently when I've booted linux or Win2000 !!
> 
> Well, I saw the exim.conf file and there were some referrings to the old 
> host name (debianAdriano) so I run eximconfig again.
> 
> But now I wonder what other files still refer to the old name? What 
> consequences I'm gonna run into?

Most things will survive quite well.  The mail system may be a little
tricky though, mail loops are evil so you should definately make sure
that that is consistent.  With exim it is easy, run eximconfig again,
just like you did already.

"grep -r $oldname /etc" is your friend.  That is what I've done a few
times in the past and it works quite well.  Vi a bit here and there and
maybe restart a daemon.  "cat $newname > /proc/sys/kernel/hostname" and
you need not even reboot AFAIK.

Cheers,


Joost



Reply to: