RE: Machine Hostname




Thanks Roberto, it worked. I have another question, will that affect on another service that were started before setting the hostname?. I believe that my DHCP sends the hostname but I don't know why it is not set when the machine boots.

Thanks.

________________________________

From: Roberto C. Sanchez [mailto:roberto@xxxxxxxxxxxxxxxxxx]
Sent: Sun 4/30/2006 1:27 PM
To: debian-user@xxxxxxxxxxxxxxxx
Subject: Re: Machine Hostname



Amir Saad wrote:
I created a boot image and it works correctly except when setting the hostname, I want it to read the name from the DNS then to use it. How can I do that? I created the image on Debian

Thanks.


I am not sure what you are asking. Are you obtaining an address from
DHCP? If so, the DHCP server needs to send the hostname. As far as I
know, there is no way to get your own hostname out of DNS during boot.
After booting, however, you could have a cron job that does a reverse
lookup on your IP and then sets the hostname accordingly.

-Roberto

--
Roberto C. Sanchez
http://familiasanchez.net/~roberto



Relevant Pages

  • Re: hostname with DHCP
    ... > Just rebooted my system and apparently only entering a hostname ... > in /etc/nodename did not seem to work under my DHCP client ... value ends up being used for this interface. ... configuration and get it to install most of the DHCP stuff using its ...
    (comp.unix.solaris)
  • RE: hostname and dhcp
    ... pretty sure my smtp server requires me to log in), and every once in a while ... >Subject: RE: hostname and dhcp ... >FBSD built in DHCP client to get an lease from your ISP. ... >server with your FQDN and it's being sent to your system when you ...
    (freebsd-questions)
  • Re: Security flaw in ALCATEL/THOMSON Speed Touch Pro ADSL modems
    ... | because it's a way DHCP and DNS are supposed to work and it's ... firmware simply doesn't validate any further Hostname given to it, ... this flaw allows to corrupt the local zone file ...
    (Bugtraq)
  • Re: hostname with DHCP
    ... This assumes that the DHCP server (in my case a Linksys router ... hostname to be 'eagle' and my registered domain is 'mydomain.com' ... The DHCP hostname configuration does not work out of the box ... in Solaris when the server does not provide a hostname. ...
    (comp.unix.solaris)
  • SUMMARY: Solaris 9 DHCP client hostname / DNS Update
    ... echo "Setting hostname to $HOSTNAME... ... The Solaris DHCP client will not directly send updates to a DNS server; ... DNS on its behalf. ... hostname from the DHCP server, and most DHCP servers won't provide it. ...
    (SunManagers)