[oclug] fully qualified host name on debian

Brad Barnett lists at L8R.net
Fri Jul 30 10:33:25 EDT 2004


On Fri, 30 Jul 2004 09:26:53 -0400
Dana Webber <dana at dunrobin.dyn.dhs.org> wrote:

> Thanks for all the help so far. Here's another question.
> It looks like some setting with regard to the hostname is wrong
> 
> The debian host is getting it's ip from dunrobin by dhcp.
> But it is "keeping secret" it's hostname
> 

Possessive for "it" is "its" .. not "it's".

Dhcpcd does not set your hostname by default.  This is quite desirable,
since more and more people are using dhcp to connect via their cable
modems.  

Anyhow, type 'man dhcpcd-bin' for more in how to make it set your
hostname via dhcp.  That is, of course, if you are using dhcpcd.  You'll
probably have to edit the wrapper script at /sbin/dhcpcd if you really
desire this behaviour.  

Still, why not just set your hostname at /etc/hostname, and be done with
it?  


> [root at dunrobin root]# tail -n 8 /var/lib/dhcp/dhcpd.leases
> }
> lease 192.168.43.247 {
>   starts 5 2004/07/30 12:08:16;
>   ends 5 2004/07/30 23:14:56;
>   binding state active;
>   next binding state free;
>   hardware ethernet 00:50:ba:3f:4e:c3;
> }
> [root at dunrobin root]#
> 
> After booting, the debian system does not seem to know it fqdn
> 
> Debian:~# dpkg-reconfigure  apache
> Reloading apache modules[Fri Jul 30 04:45:13 2004] [alert] apache: Could
> not determine the server's fully qualified domain name, using 127.0.0.1
> for ServerName
> 
> Debian:~# hostname --fqdn
> debian
> 
> Debian:~# hostname
> Debian
> 
> Debian:~# cat /etc/hostname
> Debian
> 
> Debian:~# cat /etc/hosts
> 127.0.0.1       debian  localhost
> 
> # The following lines are desirable for IPv6 capable hosts
> # (added automatically by netbase upgrade)
> 
> ::1     ip6-localhost ip6-loopback
> fe00::0 ip6-localnet
> ff00::0 ip6-mcastprefix
> ff02::1 ip6-allnodes
> ff02::2 ip6-allrouters
> ff02::3 ip6-allhosts
> 
> .Debian:~# grep -i hostname /var/log/messages*
> Debian:~#
> 




More information about the OCLUG mailing list