Bug 163367 - Default configuration file should exist in /etc
Default configuration file should exist in /etc
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: dhcp (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-15 11:04 EDT by Mike MacCana
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version: dhcp-3.0.1-48+
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-16 14:20:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike MacCana 2005-07-15 11:04:29 EDT
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). 

How reproducible:
Always

Steps to Reproduce:
1.Install 

Actual results:
No configuration file in the configuration directory.

Expected results:
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 :^).
Comment 1 Jason Vas Dias 2005-07-15 11:31:16 EDT
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.

 
Comment 2 Mike MacCana 2005-07-16 04:22:46 EDT
That's not correct, at least on Fedora (can check on RHEL dhcpd when the weekend
is over).

'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.

Reopened. 
Comment 3 Jason Vas Dias 2005-07-20 09:55:10 EDT
RE: 
"  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 .
Comment 4 Mike MacCana 2005-07-22 05:01:23 EDT
"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

# -----------------------------------------------------------
# WARNING: 
# 
# 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 
# NETWORK.
# ----------------------------------------------------

* 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?

Comment 5 Jason Vas Dias 2005-07-27 16:05:08 EDT
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.
Comment 6 Jason Vas Dias 2006-03-16 14:20:02 EST
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 
/usr/share/doc/dhcp*/dhcpd.conf.sample .


Note You need to log in before you can comment on or make changes to this bug.