1

I have a radiusd server on a virtual machine, it's already configured and working when I issue "radiusd -X" aka debug mode. My only issue is that when I try to run it as a service it fails...

Here's the error I got in the logs,

"Sat Jun 28 17:51:12 2014 : Error: Failed binding to interface eth1: Operation not permitted Sat Jun 28 17:51:12 2014 : Error: /etc/raddb/radiusd.conf[240]: Error binding to port for 0.0.0.0 port 1812"

Indeed it says the operation is not permitted but I did not know Linux could disallow binding on interface whatsoever... Also the port (1812) is not a priviliged port. My machine is running Scientific Linux 6.5 (RHEL fork). I already tried disabling selinux but it did not do the trick. Anyways I also disabled the user switch in radiusd.conf so radiusd run as root but I still have that operation not permitted error. That's strange again, it only proves the service does not run radiusd as root but now "radiusd -X" and ps faux shows me radiusd runs as root. Why the simple fact I use the service file would make it NOT run as root?

Here's the start function of the service file.

start() {
 [ -x $exec ] || exit 5
 [ -f $config ] || exit 6
 echo -n $"Starting $prog: "

 daemon --pidfile $pidfile $exec -d $config_dir
 retval=$?
 echo
 [ $retval -eq 0 ] && touch $lockfile
 return $retval
 }

Any help would be greatly appreciated :) Thanks.

EDIT: I kind of solved my issue by rewriting services files in a minimal way, but that's still not the best approach...

  start() {
    echo "Starting radiusd"
    radiusd
    }

  stop() {
         echo "Stopping radiusd"
         killall radiusd
         echo "done"
          }
  • Is there any more detailed information in your logs particularly the audit log ? Is anything already listening on eth1:1812 - use netstat. – user9517 Jun 28 '14 at 16:32
  • Thanks for you comment. Actually that's the only thing I have in the logs, I also checked nothing was running on the port 1812 and that was the case. A quick solution would be to run make the service file run radiusd as root but for any reasons it won't. I'm sorry being fuzzy. – Bryce Tichit Jun 29 '14 at 17:05

0 Answers0