Re: Freeradius(.net) and Oracle
Sorry for the delay Peter. I overlooked you message. On Tue, 23 Jan 2007 02:34:55, Peter Nixon wrote:
I don't believe that "freeradius.net" contains database support of any > kind. You will likely have to recompile freeradius yourself if you want to add Oracle support. You can expect some pain getting it all to build correctly on windows.
So, am I understanding you to say that I would be better off not installing the .net version, but instead download the sources and compile on the server (W2K running Cygwin)?
On Tue 30 Jan 2007 20:35, Brian Atkins wrote:
Sorry for the delay Peter. I overlooked you message.
On Tue, 23 Jan 2007 02:34:55, Peter Nixon wrote:
I don't believe that "freeradius.net" contains database support of
any > kind.
You will likely have to recompile freeradius yourself if you want to add Oracle support. You can expect some pain getting it all to build correctly on windows.
So, am I understanding you to say that I would be better off not installing the .net version, but instead download the sources and compile on the server (W2K running Cygwin)?
If by better off you mean "have some chance of it working" then yes. However, if you do not have some experience with compiling software on windows then I suggest you use a Linux server instead as it is considerably easier. I don't think that any of the FreeRADIUS developers actively test FreeRADIUS on windows so while we will help where we can it will not be to the same level as a Linux/Unix server. That being said there may be someone else on the users list who can help you.. (Although the responses thus far have been a bit thin..) Cheers -- Peter Nixon http://www.peternixon.net/ PGP Key: http://www.peternixon.net/public.asc
Just curious what the minimum modules required to use Freeradius to authenticate (not sure if that is the correct terminology) from and Oracle DB. Keep in mind that I am only planning on querying the DB and not updating or inserting information for accounting purposes. However, I wouldn't rule out using a text file (radutmp, I think) for accounting purposes, though. I have been trying to compile it using the following: # ORACLE_HOME=/cygdrive/d/oracle/ora92; export ORACLE_HOME # cd freeradius-1.1.4 # ./configure Which generates an error: rlm_perl.c: In function `rlm_perl_get_handles': rlm_perl.c:226: warning: cast to pointer from integer of different size rlm_perl.c: At top level: rlm_perl.c:614: error: external linkage required for symbol 'XS_radiusd_radlog' because of 'dllexport' attribute. I have also used: # ./configure --without-rlm_perl Which appear to compile successfully, but I get a lot of errors about missing modules and/or libraries. # ./radiusd.exe -X ... radiusd: entering modules setup Module: Library search path is /usr/local/lib radiusd.conf[10] Failed to link to module 'rlm_sql': No such file or directory radiusd.conf[1850] Unknown module "sql". radiusd.conf[1779] Failed to parse authorize section. I know I have a library linking issue, but I read the <a href="http://wiki.freeradius.org/index.php/FAQ#It_says_.22Could_not_link_..._file_not_found.22.2C_what_do_I_do.3F">FAQs </a> and attempted to resolve them using the methods mentioned. I get no errors during the configure for sql modules (other than mysql, but I'm not trying to compile support for that anyway). Since I'm using the Oracle libs to create the Oracle modules, I don't *think* I should disable shared libraries. ... Or should I? I've also tried setting: LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/cygdrive/d/oracle/ora92/oci/lib:/cygdrive/d/oracle/ora92/lib Without good results. I also do not have ld.conf nor ldconfig on the system (Cygwin), but I have read elsewhere that neither of them should be required. I realize that this is not necessarily an issue with Freeradius. Although I am having trouble compiling from source, I can install the .NET version and run without issue. From my understanding, both are basically the same, just .NET has had changes made to deal with the different path structure in Cygwin. I saw a lot of old posts (<2003) that dealt with similar issues, but on much older versions (Oracle 8 and Freeradius .1 - .3). Help, insight, thoughts are all appreciated. Attached below is my somewhat hacked up conf files. Sorry for the long post. Thanks, Brian RADIUSD.CONF ------------ prefix = /usr/local exec_prefix = ${prefix} sysconfdir = ${prefix}/etc localstatedir = ${prefix}/var sbindir = ${exec_prefix}/sbin logdir = ${localstatedir}/log/radius raddbdir = ${sysconfdir}/raddb radacctdir = ${logdir}/radacct certsdir = ${sysconfdir}/raddb/certs/FreeRADIUS.net/DemoCerts confdir = ${raddbdir} run_dir = ${localstatedir}/run/radiusd log_file = ${logdir}/radius.log libdir = ${exec_prefix}/lib pidfile = ${run_dir}/radiusd.pid max_request_time = 30 delete_blocked_requests = no cleanup_delay = 5 max_requests = 1024 bind_address = * port = 0 hostname_lookups = no allow_core_dumps = no regular_expressions = no extended_expressions = no log_stripped_names = no log_auth = no log_auth_badpass = no log_auth_goodpass = no usercollide = no lower_user = no lower_pass = no nospace_user = no nospace_pass = no checkrad = ${sbindir}/checkrad security { max_attributes = 200 reject_delay = 1 status_server = no } proxy_requests = yes $INCLUDE ${confdir}/proxy.conf $INCLUDE ${confdir}/clients.conf snmp = no $INCLUDE ${confdir}/snmp.conf thread pool { start_servers = 5 max_servers = 32 min_spare_servers = 3 max_spare_servers = 10 max_requests_per_server = 0 } modules { files { } detail { detailfile = ${radacctdir}/%{Client-IP-Address}/detail-%Y%m%d detailperm = 0600 } $INCLUDE ${confdir}/oraclesql.conf radutmp { filename = ${logdir}/radutmp username = %{User-Name} case_sensitive = yes check_with_nas = yes perm = 0600 callerid = "no" } radutmp sradutmp { filename = ${logdir}/sradutmp perm = 0644 callerid = "no" } attr_filter { attrsfile = ${confdir}/attrs } counter daily { filename = ${raddbdir}/db.daily key = User-Name count-attribute = Acct-Session-Time reset = daily counter-name = Daily-Session-Time check-name = Max-Daily-Session allowed-servicetype = Framed-User cache-size = 5000 } always fail { rcode = fail } always reject { rcode = reject } always ok { rcode = ok simulcount = 0 mpp = no } digest { } } instantiate { } authorize { sql } authenticate { } preacct { } accounting { sql } session { } post-auth { } pre-proxy { } post-proxy { } CLIENTS.CONF: ------------- client 127.0.0.1 { secret = testing123 shortname = localhost } client 10.10.58.106 { secret = My_Secret shortname = Some_Server } ORACLESQL.CONF -------------- sql { driver = "rlm_sql_oracle" server = "localhost" login = "my_account" password = "my_password" radius_db = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) \ (HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=L9D1)))" acct_table1 = "radacct" acct_table2 = "radacct" authcheck_table = "itagency" authreply_table = "radreply" deletestalesessions = yes sqltrace = no sqltracefile = ${logdir}/sqltrace.sql num_sql_socks = 5 connect_failure_retry_delay = 60 sql_user_name = "%{User-Name}" authorize_check_query = "select 1 as ID, barcode AS username, \ 'Password' as attribute, pin as value, '==' as op from \ itagency where barcode = '%{SQL-User-Name}' and \ blockstatus is null" authorize_reply_query = "SELECT id,UserName,Attribute,Value,op \ FROM ${authreply_table} WHERE Username = \ '%{SQL-User-Name}' ORDER BY id" }
Brian Atkins wrote:
Just curious what the minimum modules required to use Freeradius to authenticate (not sure if that is the correct terminology) from and Oracle DB.
The oracle module is required. Not much else.
Which generates an error:
rlm_perl.c: In function `rlm_perl_get_handles': rlm_perl.c:226: warning: cast to pointer from integer of different size rlm_perl.c: At top level: rlm_perl.c:614: error: external linkage required for symbol 'XS_radiusd_radlog' because of 'dllexport' attribute.
If you're not going to use rlm_perl, just delete the directory. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
After removing the rlm_perl directory and rebuilding freeradius (no errors), I am getting: # radius.exe -X ... Module: Library search path is /usr/local/lib radiusd.conf[10] Failed to link to module 'rlm_sql': Permission denied radiusd.conf[1850] Unknown module "sql". radiusd.conf[1779] Failed to parse authorize section. Ok, so it 'sees' the module, but can initialize it due to permissions. But I don't see anything wrong with the permissions (keep in mind this is Cygwin on Windows): Administrator@tempsvr /usr/local/sbin $ ls -l /usr/local/lib/rlm_sql* lrwxrwxrwx 1 Administrator None 10 Feb 12 10:09 /usr/local/lib/rlm_sql-1.1.4.la -> rlm_sql.la -rwxr-xr-x 1 Administrator None 113214 Feb 12 10:09 /usr/local/lib/rlm_sql.a -rwxr-xr-x 1 Administrator None 812 Feb 12 10:09 /usr/local/lib/rlm_sql.la lrwxrwxrwx 1 Administrator None 14 Feb 12 10:09 /usr/local/lib/rlm_sql_log-1.1.4.la -> rlm_sql_log.la -rwxr-xr-x 1 Administrator None 38354 Feb 12 10:09 /usr/local/lib/rlm_sql_log.a -rwxr-xr-x 1 Administrator None 799 Feb 12 10:09 /usr/local/lib/rlm_sql_log.la -rwxrwxrwx 1 Administrator None 67982 Feb 12 10:09 /usr/local/lib/rlm_sql_oracle.a -rwxrwxrwx 1 Administrator None 802 Feb 12 10:09 /usr/local/lib/rlm_sql_oracle.la lrwxrwxrwx 1 Administrator None 17 Feb 12 10:09 /usr/local/lib/rlm_sqlcounter-1.1.4.la -> rlm_sqlcounter.la -rwxr-xr-x 1 Administrator None 45752 Feb 12 10:09 /usr/local/lib/rlm_sqlcounter.a -rwxr-xr-x 1 Administrator None 808 Feb 12 10:09 /usr/local/lib/rlm_sqlcounter.la Administrator@imd-lstempsvr /usr/local/sbin $ id uid=500(Administrator) gid=513(None) groups=0(root),513(None),544(Administrators),545(Users),1003(ORA_DBA) What am I overlooking? Group perhaps? Brian
participants (3)
-
Alan DeKok -
Brian Atkins -
Peter Nixon