Configure radius to run script under different user
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
radiusd: Cannot initialize supplementary group list for user support: Operation not permitted
I guess its something to do with permissions but I canít figure out what I need to change? I just want this to work under user support, if Iím logged in as root and run #./start-my-radius.sh it works fine and starts up radius. However I have to amend radius.conf to get this to work via root login so it looks like this
#user = support
#group = support
So what have I missed?
The radius files look like this
support@OXC-RPROXY-02:/usr/local/sbin$ ls -l
-rwxr-xr-x 1 support support 36403 Oct 12 13:57 checkrad
-rwxr-xr-x 1 support support 619724 Oct 12 13:57 radiusd
-rwxr-xr-x 1 support support 115567 Oct 12 13:57 radmin
-rwxr-xr-x 1 support support 1285 Oct 12 13:57 radwatch
-rwxr-xr-x 1 support support 2471 Oct 12 14:22 rc.radiusd
-rwxr-xr-x 1 support support 2506 Oct 12 14:22 rc.radiusdbkp
This is what it looks like when the script starts via root
support@OXC-RPROXY-02:/etc/init.d$ ps aux | grep radiusd
Well you can easily run a service via su within your script, but why are you not using a standard sysVinit script to do this anyway? I'd really recommend using a proper service script rather than writing your own unless you really have specific requirements that genuinely aren't served any other way. If you've installed this from source, you'll often find that example init scripts are available within the source release, or alternatively it's often trivial to modify an existing script for a different service to do what you need. No need to start from scratch.
I guess the 'support' user must owned /usr/local/etc/raddb/, /usr/local/var/log/radius/radacct/, ... (all configuration files, log files, ...). Therefore, I suggest you re-compile FreeRADIUS with --prefix=/usr/local/radius and make this folder owned by support:support. Try again and let me know if this help.
As acid mentioned, you should use standard SysV init script.
-rw-r--r-- 1 root root 756 Oct 12 11:56 group
I've tried using the proper service script which came from the source, that again runs fine under root but if i try to get the user support run it i get the same message.
I tried commenting ut the 'group - support' line but again get exactly the same mesage.
I just want this script to run under the user support and also for when the box is rebooted it starts up radius but under the user 'root'
I am not sure how to enter the su but in my sript? This is a bit new to me, do i just need to enter su - support before my script and willi need to enter the password? I guess I need to edit the sudeors file too?