[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeradius-users
Subject:    Re: freeradius exec module only works in debug mode (freeradius -X)
From:       Alan DeKok <aland () deployingradius ! com>
Date:       2023-08-14 14:48:25
Message-ID: 9603C52C-4549-407B-BA23-93621B697EC9 () deployingradius ! com
[Download RAW message or body]

On Aug 14, 2023, at 10:41 AM, Härtl, Calvin <Calvin.Haertl@stud.hs-coburg.de> wrote:
> However, as soon as I exit the debug mode and run freeradius as a daemon (systemctl \
> start freeradius), freeradius still works as expected, but the mail no longer gets \
> sent out. Everything else works just fine (users can hop onto the WiFi, etc.).
> 
> Am I missing something here? Any help is appreciated!

  FreeRADIUS itself doesn't care about debug mode vs daemon mode, user IDs etc.  It \
just does what you want.

  The problem here is likely that in daemon mode, the server is running with a \
different ID (freerad or something similar).  And that user doesn't have permission \
to run the tools.

  The solution is to go through radiusd.conf to check the "user = " and "group = " \
configuration.  Then, become root, and then "su" to the freerad user / group.

  Try to run the script as that user.  If it doesn't work, then you know what the \
problem is, and you can debug it as user "freerad".

  It it does work, then the problem is something else, like paths.

  One simple thing is to put full paths to all executables into the "exec" line.  \
i.e. instead of:

	echo ... | mailx ...

  do

	/bin/echo ... | /usr/bin/mailx ...

  Or whatever paths are correct for your system.

  Check also the documentation for the "mailx" command.  Some mailers refuse to run \
for certain users.  You may need to update the mail configuration to allow sending \
mail as the "freerad" user.

  Alan DeKok.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic