OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: dhclient and /etc/myname

From: -f (fobiit.org)
Date: Thu Dec 02 2004 - 03:46:14 CST


hmm, on Thu, Dec 02, 2004 at 05:47:57AM +0059, Han Boetes said that
> ~% cat /etc/dhclient.conf
> interface "ne3" {
> send dhcp-client-identifier "theHostname";
> }
>
> Of course this is all very well documented in man dhclient.

and i read some of it, but can you people read?
my first post said:

the dhcp server is very restrictive
so sending a host name is out of question.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

not mentioning that dhcp-client-identifier is in most cases
a mac address. and sending that is absolutely out of question,
because i had to change the mac address of my $ext_if using sea.c,
that is how restricted i am.

so maybe 'send host-name "xyz";' would be better. but i thought
that if the dhcp server sets the hostname for my mac address
i can't override that using "send host-name"

after dhclient gets the hostname it does not set it "os wide".
right now i have an /etc/myname, as suggested by someone.

kripel> cat /etc/myname
kripel
kripel> hostname
kripel
kripel> netstat -f inet
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp 0 48 kripel.ssh amaaq.26981 ESTABLISHED
tcp 0 0 localhost.2100 *.* LISTEN
tcp 0 0 kripel.www *.* LISTEN
tcp 0 0 localhost.953 *.* LISTEN
tcp 0 0 y107.chello.upc..domai *.* LISTEN
tcp 0 0 kripel.domain *.* LISTEN
tcp 0 0 localhost.domain *.* LISTEN
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (state)
udp 0 0 y107.chello.upc..42351 ftp.cerias.purdu.ntp
udp 0 0 y107.chello.upc..41323 wolf.ifj.edu.pl.ntp
udp 0 0 y107.chello.upc..42407 ima.cipsga.org.b.ntp
udp 0 0 y107.chello.upc..3877 200.141.215.164.ntp
udp 0 0 y107.chello.upc..9925 ti231210a080-214.ntp
udp 0 0 y107.chello.upc..40698 200.141.215.162.ntp
udp 0 0 y107.chello.upc..29173 171.Red-80-36-17.ntp
udp 0 0 y107.chello.upc..17270 neptune.sg.depau.ntp
udp 0 0 kripel.netbios- *.*
udp 0 0 kripel.netbios- *.*
udp 0 0 localhost.2100 *.*
udp 0 0 y107.chello.upc..domai *.*
udp 0 0 kripel.domain *.*
udp 0 0 localhost.domain *.*
udp 0 0 kripel.ntp *.*

but as you can see, my real fqdn is 'y107.chello.upc.cz'
and i want that as hostname after dhclient sets up the connection.
isn't this sensible?

and after starting up httpd, i get:
[Fri Nov 12 01:49:13 2004] [alert] httpd: Could not determine the server's fully
 qualified domain name, using 127.0.0.1 for ServerName

-f
--
go ahead, jump. 100,000 lemmings can't be wrong.