LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   dhcp doesn't want to start (https://www.linuxquestions.org/questions/linux-newbie-8/dhcp-doesnt-want-to-start-283184/)

afterburner 01-28-2005 02:35 AM

dhcp doesn't want to start
 
Hey all

I'm trying to add some extra boot (dhcp) servers to a diskless network.

We already have two machines that do the booting and root filesystems.

What happens is that the machines in the lab don't have hard drives and when turned on they shout out for dhcp and one of the boot servers reply sending the kernel to the machine assigns it a ip etc...

Standard etherboot setup.

Now I'm trying to add an extra 2 machines to speed up the boot up process. On the other boot servers we have redhat 8 and redhat 9 running in runlevel 3. These machines are fine everything works. The new machine has a Serial ATA hard drive so I had to install Fedora Core 3 on it. Now the problem is that I'm trying to get dhcp running on the machine. I've copied the dhcp.conf file from the redhat 8 machine and edited to contain only a few entries those that corresponds to a single row of machines that I'm testing the server on. Now the problem is that dhcpd wont start.

Here's the output

[root@boot2 ~]# service dhcpd restart
audit(1106900855.566:0): avc: denied { read } for pid=4221 exe=/usr/sbin/dhcp
d name=dhcpd.conf dev=sda1 ino=9257146 scontext=root:system_r:dhcpd_t tcontext=u
ser_u:object_r:user_home_t tclass=file

And if I check /var/log/messages i see:
Jan 28 10:27:04 boot2 dhcpd: Internet Systems Consortium DHCP Server V3.0.1
Jan 28 10:27:04 boot2 dhcpd: Copyright 2004 Internet Systems Consortium.
Jan 28 10:27:04 boot2 dhcpd: All rights reserved.
Jan 28 10:27:04 boot2 dhcpd: For info, please visit ...
Jan 28 10:27:04 boot2 kernel: audit(1106900824.924:0): avc: denied { read } fo
r pid=4213 exe=/usr/sbin/dhcpd name=dhcpd.conf dev=sda1 ino=9257146 scontext=ro
ot:system_r:dhcpd_t tcontext=user_u:object_r:user_home_t tclass=file
Jan 28 10:27:04 boot2 dhcpd: Can't open /etc/dhcpd.conf: Permission denied
Jan 28 10:27:04 boot2 dhcpd:
Jan 28 10:27:04 boot2 dhcpd: If you did not get this software from ...,
please
Jan 28 10:27:04 boot2 dhcpd: get the latest from ... and install that be
fore
Jan 28 10:27:04 boot2 dhcpd: requesting help.
Jan 28 10:27:04 boot2 dhcpd:
Jan 28 10:27:04 boot2 dhcpd: If you did get this software from ftp.isc.org and h
ave not
Jan 28 10:27:04 boot2 dhcpd: yet read the README, please read it before requesti
ng help.
Jan 28 10:27:04 boot2 dhcpd: If you intend to request help from the dhcp-server@
isc.org
Jan 28 10:27:04 boot2 dhcpd: mailing list, please read the section on the README
about
Jan 28 10:27:04 boot2 dhcpd: submitting bug reports and requests for help.
Jan 28 10:27:04 boot2 dhcpd:
Jan 28 10:27:04 boot2 dhcpd: Please do not under any circumstances send requests
for
Jan 28 10:27:04 boot2 dhcpd: help directly to the authors of this software - ple
ase
Jan 28 10:27:04 boot2 dhcpd: send them to the appropriate mailing list as descri
bed in
Jan 28 10:27:04 boot2 dhcpd: the README file.
Jan 28 10:27:04 boot2 dhcpd:
Jan 28 10:27:04 boot2 dhcpd: exiting.
Jan 28 10:27:35 boot2 dhcpd: Internet Systems Consortium DHCP Server V3.0.1
Jan 28 10:27:35 boot2 dhcpd: Copyright 2004 Internet Systems Consortium.
Jan 28 10:27:35 boot2 dhcpd: All rights reserved.
Jan 28 10:27:35 boot2 dhcpd: For info, please visit
Jan 28 10:27:35 boot2 dhcpd: Can't open /etc/dhcpd.conf: Permission denied
Jan 28 10:27:35 boot2 kernel: audit(1106900855.566:0): avc: denied { read } fo
r pid=4221 exe=/usr/sbin/dhcpd name=dhcpd.conf dev=sda1 ino=9257146 scontext=ro
ot:system_r:dhcpd_t tcontext=user_u:object_r:user_home_t tclass=file
Jan 28 10:27:35 boot2 dhcpd:
Jan 28 10:27:35 boot2 dhcpd: If you did not get this software from ftp.isc.org,
please
Jan 28 10:27:35 boot2 dhcpd: get the latest from ftp.isc.org and install that be
fore
Jan 28 10:27:35 boot2 dhcpd: requesting help.
Jan 28 10:27:35 boot2 dhcpd:
Jan 28 10:27:35 boot2 dhcpd: If you did get this software from ftp.isc.org and h
ave not
Jan 28 10:27:35 boot2 dhcpd: yet read the README, please read it before requesti
ng help.
Jan 28 10:27:35 boot2 dhcpd: If you intend to request help from the dhcp-server@
isc.org
Jan 28 10:27:35 boot2 dhcpd: mailing list, please read the section on the README
about
Jan 28 10:27:35 boot2 dhcpd: submitting bug reports and requests for help.
Jan 28 10:27:35 boot2 dhcpd:
Jan 28 10:27:35 boot2 dhcpd: Please do not under any circumstances send requests
for
Jan 28 10:27:35 boot2 dhcpd: help directly to the authors of this software - ple
ase
Jan 28 10:27:35 boot2 dhcpd: send them to the appropriate mailing list as descri
bed in
Jan 28 10:27:35 boot2 dhcpd: the README file.
Jan 28 10:27:35 boot2 dhcpd:
Jan 28 10:27:35 boot2 dhcpd: exiting.



There is one line that says

Jan 28 10:27:04 boot2 dhcpd: Can't open /etc/dhcpd.conf: Permission denied

Which is ridiculous since the file is owned by root and has the folowing permissions
-rwxr-xr-x 1 root root 3129 Jan 27 16:10 /etc/dhcpd.conf

so why can't the service run?

Is there some security setting in Fedora that is maybe active or something?

Anyone have any ideas?

Thanks
:newbie:


Don't worry about this anymore. I've solved it. It turns out that Fedora blocks the dhcpd daemon. You can fix this by going to the security settings menu in the x-session, clicking on the selinux tab and there is a list of daemons that is must not block. Tick the box for dhcp, and httpd cos it also blocks that one, and restart.

DHCP now works. ... <sigh>

musicman_ace 01-28-2005 05:40 AM

Darn, I was going to answer it too. Read the whole question just to get to the bottom and find out it has already been solved. :mad: :cry:

afterburner 01-28-2005 06:51 AM

yeah but it's so frustrating, but at least now if someone runs into the same problem at least they'll have this as a reference.

Thanks anyway

xofrepus 03-29-2005 04:31 PM

Now how about doing that from the command line? (no gui...)

J.W. 03-29-2005 10:57 PM

To restart dhcp from the command line
Code:

dhcpd -r eth0
Substitute the appropriate network interface if you are using something other than eth0. Note that the command may seem to hang when you run it; if so just Ctl-c to escape. Then run
Code:

ifconfig
and you should see an IP address associated to eth0. If so, you're set, if not post back. -- J.W.

Welcome to LQ!

xofrepus 03-30-2005 11:41 AM

wasn't asking how to restart DHCP... was wondering how to get DHCPD so it is not blocked by SELinux in RedHat Enterprise 4/Fedroa Core 3 from the command line.

Jacek Pliszka 11-26-2005 02:23 PM

/usr/sbin/setsebool -P dhcpd_disable_trans 1

sumugan 02-26-2008 03:55 AM

dhcpd start on entp linux
 
It worked ..thanks a lot


Quote:

Originally Posted by afterburner (Post 1435431)
Hey all

I'm trying to add some extra boot (dhcp) servers to a diskless network.

We already have two machines that do the booting and root filesystems.

What happens is that the machines in the lab don't have hard drives and when turned on they shout out for dhcp and one of the boot servers reply sending the kernel to the machine assigns it a ip etc...

Standard etherboot setup.

Now I'm trying to add an extra 2 machines to speed up the boot up process. On the other boot servers we have redhat 8 and redhat 9 running in runlevel 3. These machines are fine everything works. The new machine has a Serial ATA hard drive so I had to install Fedora Core 3 on it. Now the problem is that I'm trying to get dhcp running on the machine. I've copied the dhcp.conf file from the redhat 8 machine and edited to contain only a few entries those that corresponds to a single row of machines that I'm testing the server on. Now the problem is that dhcpd wont start.

Here's the output

[root@boot2 ~]# service dhcpd restart
audit(1106900855.566:0): avc: denied { read } for pid=4221 exe=/usr/sbin/dhcp
d name=dhcpd.conf dev=sda1 ino=9257146 scontext=root:system_r:dhcpd_t tcontext=u
ser_u:object_r:user_home_t tclass=file

And if I check /var/log/messages i see:
Jan 28 10:27:04 boot2 dhcpd: Internet Systems Consortium DHCP Server V3.0.1
Jan 28 10:27:04 boot2 dhcpd: Copyright 2004 Internet Systems Consortium.
Jan 28 10:27:04 boot2 dhcpd: All rights reserved.
Jan 28 10:27:04 boot2 dhcpd: For info, please visit ...
Jan 28 10:27:04 boot2 kernel: audit(1106900824.924:0): avc: denied { read } fo
r pid=4213 exe=/usr/sbin/dhcpd name=dhcpd.conf dev=sda1 ino=9257146 scontext=ro
ot:system_r:dhcpd_t tcontext=user_u:object_r:user_home_t tclass=file
Jan 28 10:27:04 boot2 dhcpd: Can't open /etc/dhcpd.conf: Permission denied
Jan 28 10:27:04 boot2 dhcpd:
Jan 28 10:27:04 boot2 dhcpd: If you did not get this software from ...,
please
Jan 28 10:27:04 boot2 dhcpd: get the latest from ... and install that be
fore
Jan 28 10:27:04 boot2 dhcpd: requesting help.
Jan 28 10:27:04 boot2 dhcpd:
Jan 28 10:27:04 boot2 dhcpd: If you did get this software from ftp.isc.org and h
ave not
Jan 28 10:27:04 boot2 dhcpd: yet read the README, please read it before requesti
ng help.
Jan 28 10:27:04 boot2 dhcpd: If you intend to request help from the dhcp-server@
isc.org
Jan 28 10:27:04 boot2 dhcpd: mailing list, please read the section on the README
about
Jan 28 10:27:04 boot2 dhcpd: submitting bug reports and requests for help.
Jan 28 10:27:04 boot2 dhcpd:
Jan 28 10:27:04 boot2 dhcpd: Please do not under any circumstances send requests
for
Jan 28 10:27:04 boot2 dhcpd: help directly to the authors of this software - ple
ase
Jan 28 10:27:04 boot2 dhcpd: send them to the appropriate mailing list as descri
bed in
Jan 28 10:27:04 boot2 dhcpd: the README file.
Jan 28 10:27:04 boot2 dhcpd:
Jan 28 10:27:04 boot2 dhcpd: exiting.
Jan 28 10:27:35 boot2 dhcpd: Internet Systems Consortium DHCP Server V3.0.1
Jan 28 10:27:35 boot2 dhcpd: Copyright 2004 Internet Systems Consortium.
Jan 28 10:27:35 boot2 dhcpd: All rights reserved.
Jan 28 10:27:35 boot2 dhcpd: For info, please visit
Jan 28 10:27:35 boot2 dhcpd: Can't open /etc/dhcpd.conf: Permission denied
Jan 28 10:27:35 boot2 kernel: audit(1106900855.566:0): avc: denied { read } fo
r pid=4221 exe=/usr/sbin/dhcpd name=dhcpd.conf dev=sda1 ino=9257146 scontext=ro
ot:system_r:dhcpd_t tcontext=user_u:object_r:user_home_t tclass=file
Jan 28 10:27:35 boot2 dhcpd:
Jan 28 10:27:35 boot2 dhcpd: If you did not get this software from ftp.isc.org,
please
Jan 28 10:27:35 boot2 dhcpd: get the latest from ftp.isc.org and install that be
fore
Jan 28 10:27:35 boot2 dhcpd: requesting help.
Jan 28 10:27:35 boot2 dhcpd:
Jan 28 10:27:35 boot2 dhcpd: If you did get this software from ftp.isc.org and h
ave not
Jan 28 10:27:35 boot2 dhcpd: yet read the README, please read it before requesti
ng help.
Jan 28 10:27:35 boot2 dhcpd: If you intend to request help from the dhcp-server@
isc.org
Jan 28 10:27:35 boot2 dhcpd: mailing list, please read the section on the README
about
Jan 28 10:27:35 boot2 dhcpd: submitting bug reports and requests for help.
Jan 28 10:27:35 boot2 dhcpd:
Jan 28 10:27:35 boot2 dhcpd: Please do not under any circumstances send requests
for
Jan 28 10:27:35 boot2 dhcpd: help directly to the authors of this software - ple
ase
Jan 28 10:27:35 boot2 dhcpd: send them to the appropriate mailing list as descri
bed in
Jan 28 10:27:35 boot2 dhcpd: the README file.
Jan 28 10:27:35 boot2 dhcpd:
Jan 28 10:27:35 boot2 dhcpd: exiting.



There is one line that says

Jan 28 10:27:04 boot2 dhcpd: Can't open /etc/dhcpd.conf: Permission denied

Which is ridiculous since the file is owned by root and has the folowing permissions
-rwxr-xr-x 1 root root 3129 Jan 27 16:10 /etc/dhcpd.conf

so why can't the service run?

Is there some security setting in Fedora that is maybe active or something?

Anyone have any ideas?

Thanks
:newbie:


Don't worry about this anymore. I've solved it. It turns out that Fedora blocks the dhcpd daemon. You can fix this by going to the security settings menu in the x-session, clicking on the selinux tab and there is a list of daemons that is must not block. Tick the box for dhcp, and httpd cos it also blocks that one, and restart.

DHCP now works. ... <sigh>



All times are GMT -5. The time now is 07:48 AM.