Red Hat Bugzilla – Bug 163367
Default configuration file should exist in /etc
Last modified: 2007-11-30 17:07:19 EST
Description of problem:
Currently dhcpd's only sample configuration file is the one the documentation
dir. This is not consistant with nearly every other network service package in
RHEL, with the exception of nfs (which is having a similar bug filed).
Steps to Reproduce:
No configuration file in the configuration directory.
A config file in /etc. Just like httpd, squid, samba, vsftpd, etc. Most likely
with all the options commented out in case someone accidentally turns the
service on :^).
No - I think the default behavior should be for dhcpd to exit with error
"Can't open /etc/dhcpd.conf: No such file or directory", as it does currently.
There is no meaningful default content for dhcpd.conf that would not cause
dhcpd to exit with even more cryptic error messages, or which would not be
confusing and misleading to novice users, who must be encouraged to read
the dhcpd.conf(5) man-page and the sample dhcpd.conf in /usr/share/doc/dhcp*/,
or which would not be potentially dangerous if dhcpd was started unintentionally.
dhcpd should be configured only by those who know what they are doing, as it
can cause havoc when misconfigured on a network where another dhcpd is running.
That's not correct, at least on Fedora (can check on RHEL dhcpd when the weekend
'service dhcpd start' gives no output whatsoever, not even a [FAILED] message,
when the config file doesn't exist on dhcp-3.0.2-14.FC4 (don't have access to
RHEL at the weekend).
When a config file exists in /etc, with the subnet declaration commented out,
'service dhcpd start' gives a [FAILED] message and /var/log/messages tells users
they need asubnet declaration.
A default configuration file with commented out sections is not more dangerous
than no confuguration file at all, and much less confusing.
" A default configuration file with commented out sections is not more dangerous
than no configuration file at all, and much less confusing.
I disagree. It could give the impression that dhcpd is a service that
should be running in a normal installation or that would be likely to be
used by an average user - it is NOT .
There is no "commented out section" that we could put in a default
dhcpd.conf configuration file that would not be potentially misleading or
dangerous if uncommented .
dhcpd really is one service that we should discourage all but knowledgable
users from configuring .
"dhcpd really is one service that we should discourage all but knowledgable
users from configuring."
I agree, but I'd still like to make it more obvious for the knowledgable to
configure. Due to our unfortunate practices of not using manual section 5 where
we should, many RHEL admins don't expect to get config file formats from man
pages. They also have an unfortunate habit of ignoring /usr/share/doc.
In the suggested scenario, a user would have have to:
* install dhcp
* start the service
* open the config file
* see the contents of the config file
* modify the contents of the config file to enable configuration for a demo subnet
To further make the point, how about the following:
* Adding the following to the very promininent comment to the top of dhcpd.conf
# THIS IS A DHCP SERVER. THIS IS NOT A DHCP CLIENT.
# MOST PEOPLE USE A DHCP CLIENT. VERY FEW PEOPLE WANT TO USE A DHCP SERVER.
# IF YOU DO NOT KNOW THE DIFFERENCE BETWEEN A DHCP SERVER AND A DHCP CLIENT,
# PLEASE UNINSTALL THE dhcp PACKAGE.
# DO NOT START THE dhcpd SERVICE UNLESS YOU ADMINISTER THE NETWORK THE SERVICE
# IS RUNNING ON.
# IF THIS IS NOT THE CASE, THE ADMINISTRATOR OF THAT NETWORK WILL LIKELY
# DISCONNECT YOU FROM THAT NETWORK, AND MAY PENALIZE YOUR MISUSE OF THEIR
* renaming the package dhcp-server (which is clearer for administrators too).
* Or even just making a dhcpd.conf with no content other than the warning above
and a mention of where to get the sample config from?
OK, since you insist, I'll add a default empty dhcpd.conf file with a pointer
to the sample config file, in the next dhcp releases (the current R4-U2 update
did not make it into the QA budget).
If we had not already shipped a 'dhcp' package, yes it would make sense to
provide separate 'dhcp-server' and 'dhcrelay' packages, but not now that
we've already bundled dhcpd and dhcrelay in the dhcp package - perhaps
I'll re-examine this for RHEL-5.
This bug is actually fixed with the current dhcp-3.0.1-54.EL4+ version in RHEL-4
U3, and in all current FC dhcp versions - dhcp now 'Provides:' a default
/etc/dhcpd.conf file with a comment pointing people to