Sorry if this is too basic of a question but I've been fighting with this for a while and google hasn't turned up anything for me. I am running freeradius on Centos and it runs the freeradius daemon as the radiusd user&group. However when I start radrelay it starts as root which then changes the detail file to be owned by root thus causing radiusd not to be able to write any further accounting packets to the file. I've tried starting radrelay as the user radiusd as follows but its not working. # su -c 'radrelay -xx -s SecretPass -r 192.168.1.4:1645 /var/log/radius/radacct/detail' radiusd I do not get any debug information back it just goes back to the prompt and radrelay doesn't start. Is there another way of making radrelay run as the user radiusd? I guess I could change radiusd to run as root or make the detail file permissions world writeable but I would like to avoid doing either of those if at all possible. -Eric
"Eric Merkel" <ejmerkel@gmail.com> wrote:
# su -c 'radrelay -xx -s SecretPass -r 192.168.1.4:1645 /var/log/radius/radacct/detail' radiusd
I do not get any debug information back it just goes back to the prompt and radrelay doesn't start.
Try doing an "strace" to see what's going on.
Is there another way of making radrelay run as the user radiusd?
Make it suid radiusd? Alan DeKok.
On 6/13/06, Alan DeKok <aland@nitros9.org> wrote:
"Eric Merkel" <ejmerkel@gmail.com> wrote:
# su -c 'radrelay -xx -s SecretPass -r 192.168.1.4:1645 /var/log/radius/radacct/detail' radiusd
I do not get any debug information back it just goes back to the prompt and radrelay doesn't start.
Try doing an "strace" to see what's going on.
Here is the last part of the strace. Looks like it is dying on the 3rd line. Any clue what this means? -Eric socket(PF_NETLINK, SOCK_RAW, 9) = 3 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 readlink("/proc/self/exe", 0xbfe142e0, 4095) = -1 EACCES (Permission denied) sendto(3, "l\0\0\0R\4\5\0\6\0\0\0\0\0\0\0PAM session clos"..., 108, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 108 select(4, [3], NULL, NULL, {0, 100000}) = 1 (in [3], left {0, 100000}) recvfrom(3, "$\0\0\0\2\0\0\0\6\0\0\0\207j\0\0\0\0\0\0l\0\0\0R\4\5\0"..., 8476, MSG_PEEK|MSG_DONTWAIT, {sa_family=AF_NETLINK, pid=0, groups=00000000}, [12]) = 36 recvfrom(3, "$\0\0\0\2\0\0\0\6\0\0\0\207j\0\0\0\0\0\0l\0\0\0R\4\5\0"..., 8476, MSG_DONTWAIT, {sa_family=AF_NETLINK, pid=0, groups=00000000}, [12]) = 36 close(3) = 0 munmap(0xcd4000, 13204) = 0 munmap(0xe9c000, 101668) = 0 munmap(0xa76000, 88064) = 0 munmap(0x143000, 16864) = 0 munmap(0xadf000, 6152) = 0 munmap(0xc2b000, 31520) = 0 munmap(0x6a3000, 42528) = 0 munmap(0xa6f000, 21660) = 0 munmap(0x8e2000, 6556) = 0 munmap(0x13f000, 13688) = 0 munmap(0x3df000, 14812) = 0 munmap(0x780000, 56172) = 0 munmap(0xdfc000, 18704) = 0 munmap(0x7c5000, 5892) = 0 exit_group(1) = ? Process 27271 detached
On 6/13/06, Alan DeKok <aland@nitros9.org> wrote:
"Eric Merkel" <ejmerkel@gmail.com> wrote:
Here is the last part of the strace. Looks like it is dying on the 3rd line. Any clue what this means? -Eric
No idea.
Did you try making it suid?
Alan DeKok.
Yes, I finally did just chown and chmod radrelay to setuid/setgid to make it run as radiusd. Thanks for your help! -Eric
participants (2)
-
Alan DeKok -
Eric Merkel