Date: 22 Nov 2001 16:13:41 -0000 From: mico@bsd.hu To: FreeBSD-gnats-submit@freebsd.org Subject: ports/32195: New port: icradius: a powerful RADIUS daemon Message-ID: <20011122161341.11770.qmail@niedermayer.com>
next in thread | raw e-mail | index | archive | help
>Number: 32195 >Category: ports >Synopsis: New port: icradius: a powerful RADIUS daemon >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Nov 22 08:30:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Miklos Niedermayer >Release: FreeBSD 4.4-STABLE i386 >Organization: >Environment: System: FreeBSD arrakis.niedermayer.com 4.4-STABLE FreeBSD 4.4-STABLE #0: Mon Oct 29 11:27:23 CET 2001 root@arrakis.niedermayer.com:/usr/obj/usr/src/sys/MICO i386 >Description: The shar below is the skeleton of a new port, icradius. It's a powerful RADIUS daemon with MySQL backend & CGI interface. The CGI interface needs p5-IC-Radius, which i'm submitting in another PR, please commit it as well if possible. >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # icradius # icradius/Makefile # icradius/distinfo # icradius/pkg-descr # icradius/pkg-comment # icradius/files # icradius/files/radiusd.sh.sample # icradius/files/README.FreeBSD # icradius/pkg-plist # echo c - icradius mkdir -p icradius > /dev/null 2>&1 echo x - icradius/Makefile sed 's/^X//' >icradius/Makefile << 'END-of-icradius/Makefile' X# New ports collection makefile for: icradius X# Date Created: 22 Nov 2001 X# Whom: Miklos Niedermayer <mico@bsd.hu> X# X# $FreeBSD$ X# X XPORTNAME= icradius XPORTVERSION= 0.18.1 XCATEGORIES= net XMASTER_SITES= ftp://ftp.innercite.com/pub/icradius/ X XMAINTAINER= mico@bsd.hu X XRUN_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/IC/Radius.pm:${PORTSDIR}/net/p5-IC-Radius XLIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client X X# CGI_BIN - where to put radius.cgi. It should exist. XCGI_BIN?= www/cgi-bin X XMAN8= radiusd.8 X XUSE_PERL5= yes XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/src X Xpre-fetch: X @${ECHO} "" X @${ECHO} "You may use the following build options:" X @${ECHO} "" X @${ECHO} " CGI_BIN=cgidir where to put radius.cgi" X @${ECHO} " (relative to PREFIX)" X @${ECHO} "" X Xdo-configure: X @${CP} ${WRKSRC}/Makefile.BSD ${WRKSRC}/Makefile X @${PERL} -pi.orig -e 's:/usr/local/bin:${PREFIX}/bin:g' ${WRKSRC}/Makefile X @${PERL} -pi.orig -e 's:/usr/local/sbin:${PREFIX}/sbin:g' ${WRKSRC}/Makefile X @${PERL} -pi.orig -e 's:#PAM:PAM:g' ${WRKSRC}/Makefile X @${PERL} -pi.orig -e 's:/etc/raddb:${PREFIX}/etc/raddb:g' ${WRKSRC}/conf.h X Xdo-install: X @${INSTALL_PROGRAM} ${WRKSRC}/radiusd ${PREFIX}/sbin X @${INSTALL_SCRIPT} ${WRKSRC}/../scripts/radwatch ${PREFIX}/sbin X @${INSTALL_SCRIPT} ${WRKSRC}/../scripts/radlast ${PREFIX}/bin X @${INSTALL_SCRIPT} ${WRKSRC}/../scripts/radwho ${PREFIX}/bin X @${INSTALL_SCRIPT} ${WRKSRC}/../scripts/testrad ${PREFIX}/bin X @${INSTALL} -d ${PREFIX}/share/icradius X @${INSTALL_SCRIPT} ${WRKSRC}/../scripts/dictimport.pl ${WRKSRC}/../scripts/radius.db ${PREFIX}/share/icradius X @${INSTALL_SCRIPT} ${WRKSRC}/../scripts/acct*.pl ${WRKSRC}/../scripts/radius.db ${PREFIX}/share/icradius X @${INSTALL_SCRIPT} ${WRKSRC}/../scripts/user*.pl ${WRKSRC}/../scripts/radius.db ${PREFIX}/share/icradius X @${INSTALL_DATA} ${WRKSRC}/../raddb/dict* ${WRKSRC}/../raddb/huntgroups ${PREFIX}/share/icradius X @${INSTALL} -d ${PREFIX}/etc/raddb X @${INSTALL_DATA} ${WRKSRC}/../raddb/radius.conf ${PREFIX}/etc/raddb/radius.conf.sample X @${INSTALL_SCRIPT} ${FILESDIR}/radiusd.sh.sample ${PREFIX}/etc/rc.d X @${INSTALL_DATA} ${WRKSRC}/../doc/radiusd.8 ${PREFIX}/man/man8 X @${INSTALL} -d ${PREFIX}/${CGI_BIN} X @${INSTALL_DATA} ${WRKSRC}/../scripts/radius.cgi ${PREFIX}/${CGI_BIN} X X.if !defined(NOPORTDOCS) X @${INSTALL} -d ${PREFIX}/share/doc/icradius X @${INSTALL_DATA} ${WRKSRC}/../doc/README* ${PREFIX}/share/doc/icradius X @${INSTALL_DATA} ${WRKSRC}/../doc/FAQ ${PREFIX}/share/doc/icradius X @${INSTALL_DATA} ${FILESDIR}/README.FreeBSD ${PREFIX}/share/doc/icradius X.endif X X.include <bsd.port.mk> END-of-icradius/Makefile echo x - icradius/distinfo sed 's/^X//' >icradius/distinfo << 'END-of-icradius/distinfo' XMD5 (icradius-0.18.1.tar.gz) = 55585fd9947d40ab3243deb4f7738770 END-of-icradius/distinfo echo x - icradius/pkg-descr sed 's/^X//' >icradius/pkg-descr << 'END-of-icradius/pkg-descr' XThe Remote Authentication Dial-In User Service (RADIUS) is a Xclient/server security protocol created by Lucent InterNetworking Systems. X XIC-RADIUS uses a MySQL database to store all of its essential information Xsuch as the users file and the dictionary files, and also sends the Xaccounting information to the database. This, in turn, allows for Xextremely fast and efficient data manipulation and extraction with the Xease and flexibility offered by MySQL. IC-RADIUS is completely free. X XWWW: http://www.icradius.com/ X X-- Miklos Niedermayer <mico@bsd.hu> END-of-icradius/pkg-descr echo x - icradius/pkg-comment sed 's/^X//' >icradius/pkg-comment << 'END-of-icradius/pkg-comment' XA RADIUS daemon with MySQL backend & CGI interface END-of-icradius/pkg-comment echo c - icradius/files mkdir -p icradius/files > /dev/null 2>&1 echo x - icradius/files/radiusd.sh.sample sed 's/^X//' >icradius/files/radiusd.sh.sample << 'END-of-icradius/files/radiusd.sh.sample' X#!/bin/sh X Xif ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then X echo "$0: Cannot determine the PREFIX" >&2 X exit 1 Xfi X Xcase "$1" in Xstart) X ${PREFIX}/sbin/radiusd -y X ;; Xstop) X killall radiusd X ;; X*) X echo "Usage: `basename $0` {start|stop}" >&2 X ;; Xesac X Xexit 0 X END-of-icradius/files/radiusd.sh.sample echo x - icradius/files/README.FreeBSD sed 's/^X//' >icradius/files/README.FreeBSD << 'END-of-icradius/files/README.FreeBSD' X XGetting started with ICRadius on FreeBSD X======================================== X X(1) Create a database for icradius. Eg.: X mysql> create database radius; X mysql> grant all on radius.* to icradius@localhost identified by X 'password'; X mysql> flush privileges; X X The above isn't the perfect way of doing things; refer to the MySQL X manual to understand how to set up a secure privilege system. X X X(2) Import the dictionaries. X # cd /usr/local/share/icradius X # $EDITOR dictimport.pl X (set the username, password, etc for your database in dictimport.pl) X # ./dictimport.pl dictionary X X Optional: load other dictionarise for your NASes, eg: X # ./dictimport.pl dictionary.cisco X X X(3) Edit radius.cgi to be able to connect to your database. Set up a X configuration with it from a browser. Of course you can use your X plain mysql command line utility as well. X X X(4) Create /var/log/radacct if you need, and try starting X /usr/local/sbin/radiusd -xx. If everything works, you can copy X /usr/local/etc/rc.d/radiusd.sh.sample to radiusd.sh. X There's an utility called radwatch in /usr/local/sbin, you can use it to X monitor radiusd an restart it if it has died. X XNote: icradius dumps core if it cannot connect to the database. [ grr :-| ] XTry with radiusd -xx if something doesn't work before giving up. X X XMiklos Niedermayer Xmico@bsd.hu END-of-icradius/files/README.FreeBSD echo x - icradius/pkg-plist sed 's/^X//' >icradius/pkg-plist << 'END-of-icradius/pkg-plist' Xbin/radlast Xbin/radwho Xbin/testrad Xetc/rc.d/radiusd.sh.sample Xetc/raddb/radius.conf.sample Xsbin/radiusd Xsbin/radwatch Xshare/doc/icradius/README Xshare/doc/icradius/README.Y2K Xshare/doc/icradius/README.cisco Xshare/doc/icradius/README.hints Xshare/doc/icradius/README.proxy Xshare/doc/icradius/README.simul Xshare/doc/icradius/FAQ Xshare/doc/icradius/README.FreeBSD Xshare/icradius/dictimport.pl Xshare/icradius/radius.db Xshare/icradius/acctexport.pl Xshare/icradius/acctimport.pl Xshare/icradius/acctsummarize.pl Xshare/icradius/userexport.pl Xshare/icradius/userimport.pl Xshare/icradius/dictionary Xshare/icradius/dictionary.ascend Xshare/icradius/dictionary.cisco Xshare/icradius/dictionary.compat Xshare/icradius/dictionary.foundry Xshare/icradius/dictionary.livingston Xshare/icradius/dictionary.merit Xshare/icradius/dictionary.redback Xshare/icradius/dictionary.shiva Xshare/icradius/dictionary.tunnel Xshare/icradius/dictionary.usr Xshare/icradius/huntgroups Xshare/icradius/dictionary.versanet Xwww/cgi-bin/radius.cgi X@dirrm etc/raddb X@dirrm share/doc/icradius X@dirrm share/icradius END-of-icradius/pkg-plist exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011122161341.11770.qmail>