Re: MySQL database error

2003-06-18 Thread Jeff Thompson - World Net Technical Support
That was indeed it! It was set to system, changing it to Local worked! I'm
finally done, and many many thanks to this list!


> On Wednesday 18 June 2003 4:18 pm, Jeff Thompson - World Net Technical
> Support  wrote:
>> Ok I got freeradius-0.8.1 installed! ... but now mysql is not
>> authenticating users...
>>
>> I get the following error from radiusd -X:
>> rad_recv: Access-Request packet from host 204.57.72.47:1026, id=33,
>> length=57 User-Name = "jefft"
>> User-Password = "jefft1"
>> NAS-IP-Address = 204.57.72.47
>> NAS-Port = 99
> [...]
>> rlm_sql_mysql: query:  SELECT id,UserName,Attribute,Value,op FROM
>> radcheck WHERE Username = 'jefft' ORDER BY id
> [...]
>>   modcall[authorize]: module "sql" returns ok
>> users: Matched DEFAULT at 150
>>   modcall[authorize]: module "files" returns ok
>> modcall: group authorize returns ok
>>   rad_check_password:  Found Auth-Type System
>> auth: type "System"
>
> As I understand it, auth type "system" means "use the unix passwd/shadow
>  file".  You need to set "auth-type := local" at some point [either in
> the  "defualt" entry in the "users" file, or as one of the radcheck
> entries for  username=jefft in the database]
>
> --
> Yet another Blog: http://osnut.homelinux.net




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


Re: MySQL database error

2003-06-18 Thread Tom Emerson
On Wednesday 18 June 2003 4:18 pm, Jeff Thompson - World Net Technical Support 
wrote:
> Ok I got freeradius-0.8.1 installed! ... but now mysql is not
> authenticating users...
>
> I get the following error from radiusd -X:
> rad_recv: Access-Request packet from host 204.57.72.47:1026, id=33,
> length=57 User-Name = "jefft"
> User-Password = "jefft1"
> NAS-IP-Address = 204.57.72.47
> NAS-Port = 99
[...]
> rlm_sql_mysql: query:  SELECT id,UserName,Attribute,Value,op FROM radcheck
> WHERE Username = 'jefft' ORDER BY id
[...]
>   modcall[authorize]: module "sql" returns ok
> users: Matched DEFAULT at 150
>   modcall[authorize]: module "files" returns ok
> modcall: group authorize returns ok
>   rad_check_password:  Found Auth-Type System
> auth: type "System"

As I understand it, auth type "system" means "use the unix passwd/shadow 
file".  You need to set "auth-type := local" at some point [either in the 
"defualt" entry in the "users" file, or as one of the radcheck entries for 
username=jefft in the database]

-- 
Yet another Blog: http://osnut.homelinux.net


pgp0.pgp
Description: signature


RE: MySQL database error

2003-06-18 Thread Jeff Thompson - World Net Technical Support
Ok I got freeradius-0.8.1 installed! It was indeed a malfunctioning
linker, so I backed up all of my configs and reinstalled FreeBSD. I
compiled mysql4 and freeradius8 without any problems, but now mysql is not
authenticating users...

I get the following error from radiusd -X:
rad_recv: Access-Request packet from host 204.57.72.47:1026, id=33, length=57
User-Name = "jefft"
User-Password = "jefft1"
NAS-IP-Address = 204.57.72.47
NAS-Port = 99
rad_rmspace_pair:  User-Name now 'jefft'
rad_rmspace_pair:  User-Password now 'jefft1'
modcall: entering group authorize
  modcall[authorize]: module "preprocess" returns ok
rlm_chap: Could not find proper Chap-Password attribute in request
  modcall[authorize]: module "chap" returns noop
  modcall[authorize]: module "mschap" returns notfound
radius_xlat:  'jefft'
rlm_sql (sql): sql_set_user escaped user --> 'jefft'
radius_xlat:  'SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE
Username = 'jefft' ORDER BY id'
rlm_sql (sql): Reserving sql socket id: 4
rlm_sql_mysql: query:  SELECT id,UserName,Attribute,Value,op FROM radcheck
WHERE Username = 'jefft' ORDER BY id
radius_xlat:  'SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op
 FROM radgroupcheck,usergroup WHERE usergroup.Username = 'jefft' AND
usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id'
rlm_sql_mysql: query:  SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op
 FROM radgroupcheck,usergroup WHERE usergroup.Username = 'jefft' AND
usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id
radius_xlat:  'SELECT id,UserName,Attribute,Value,op FROM radreply WHERE
Username = 'jefft' ORDER BY id'
rlm_sql_mysql: query:  SELECT id,UserName,Attribute,Value,op FROM radreply
WHERE Username = 'jefft' ORDER BY id
radius_xlat:  'SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op
 FROM radgroupreply,usergroup WHERE usergroup.Username = 'jefft' AND
usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id'
rlm_sql_mysql: query:  SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op
 FROM radgroupreply,usergroup WHERE usergroup.Username = 'jefft' AND
usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id
rlm_sql (sql): Released sql socket id: 4
  modcall[authorize]: module "sql" returns ok
users: Matched DEFAULT at 150
  modcall[authorize]: module "files" returns ok
modcall: group authorize returns ok
  rad_check_password:  Found Auth-Type System
auth: type "System"
auth: Failed to validate the user.
Login incorrect: [jefft/jefft1] (from client NAS port 99)
rad_lowerpair:  User-Name now 'jefft'
modcall: entering group authorize
  modcall[authorize]: module "preprocess" returns ok
rlm_chap: Could not find proper Chap-Password attribute in request
  modcall[authorize]: module "chap" returns noop
  modcall[authorize]: module "mschap" returns notfound
radius_xlat:  'jefft'
rlm_sql (sql): sql_set_user escaped user --> 'jefft'
radius_xlat:  'SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE
Username = 'jefft' ORDER BY id'
rlm_sql (sql): Reserving sql socket id: 3
rlm_sql_mysql: query:  SELECT id,UserName,Attribute,Value,op FROM radcheck
WHERE Username = 'jefft' ORDER BY id
radius_xlat:  'SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op
 FROM radgroupcheck,usergroup WHERE usergroup.Username = 'jefft' AND
usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id'
rlm_sql_mysql: query:  SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op
 FROM radgroupcheck,usergroup WHERE usergroup.Username = 'jefft' AND
usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id
radius_xlat:  'SELECT id,UserName,Attribute,Value,op FROM radreply WHERE
Username = 'jefft' ORDER BY id'
rlm_sql_mysql: query:  SELECT id,UserName,Attribute,Value,op FROM radreply
WHERE Username = 'jefft' ORDER BY id
radius_xlat:  'SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op
 FROM radgroupreply,usergroup WHERE usergroup.Username = 'jefft' AND
usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id'
rlm_sql_mysql: query:  SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op
 FROM radgroupreply,usergroup WHERE usergroup.Username = 'jefft' AND
usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id
rlm_sql (sql): Released sql socket id: 3
  modcall[authorize]: module "sql" returns ok
users: Matched DEFAULT at 150
  modcall[authorize]: module "files" returns ok
modcall: group authorize returns ok
  rad_check_password:  Found Auth-Type System
auth: t

Re: MySQL database error

2003-06-18 Thread Nick Davis
On Tuesday 17 June 2003 22:16, Jeff Thompson - World Net Technical Support 
wrote:
> This was covered all yesterday, but here is the output of radiusd -x when
> compiled using the source tarball from freeradius.org using ./configure
> --with-raddbdir=/etc/raddb --with-logdir=/var/log/radius:

You should configure it like this:

./configure --with-raddbdir=/etc/raddb --with-logdir=/var/log/radius  
--with-mysql-include-dir=/usr/include/mysql/ --with-mysql-lib-dir=/usr/lib/ 
--with-mysql-dir=/usr/bin/ 

Just adjust the mysql directories to fit your server.


Nick

-- 
Nick Davis 
Associate Systems Administrator 
[EMAIL PROTECTED] 
Internet Exposure, Inc. 
http://www.iexposure.com  

(612)676-1946 
Web Development-Web Marketing-ISP Services


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


RE: MySQL database error

2003-06-17 Thread Paul Hampson
> From: Jeff
> Sent: Wednesday, 18 June 2003 3:14 PM

> Ok I installed version 0.8.1, but I still see the >
> open("/usr/local/lib/libradius-0.7.so", O_RDONLY) = 3
>  line. This would indicate-as you said that the linker is not working
> correctly? Or looking in the wrong place?

This indicates that you are running freeradius 0.7, or
at least loading the libraries thereof. You're better off
hammering on CVS since it'll be 0.9 soon.

[snip]

> And strace -e open radiusd:
> [MOCKINGBIRD.ROOT][/home/jefft/freeradius-0.8.1]# strace -e open radiusd
> open("/var/run/ld-elf.so.hints", O_RDONLY) = 3
> open("/usr/lib/libcrypt.so.2", O_RDONLY) = 3
> open("/usr/lib/libcipher.so.2", O_RDONLY) = 3
> open("/usr/local/lib/libradius-0.7.so", O_RDONLY) = 3

Yup. It's pulling libraries from /usr/local/lib, and I presume
you've made but not installed the server.

If you try
strace -e open ./radius
and see if it tries to load libraries from ./src/modules/lib...
Mind you, the SQL libraries may be missing in that state...
Your _best_ bet is to _install_ the server (assuming this isn't
your production Radius server) so that the old libraries are
(hopefully) overwritten.

Alternatively, what're the differences between whatever's in
the ports collection (of which I know nothing) and the freeradius0.7
release tarball which I think is still downloadable?

In fact, this time through, it didn't even try and load
rlm_sql.so... In the previously posted runs, rlm_sql and
rlm_sql_mysql and libz and libmysqlclient et. al. _were_
being loaded successfully, just below the failure lines for
the .la files (which are optional, not required, at runtime
with recent libtool). Those were all showing 0.7 anyway. The
modules should all be versioned in current CVS, and maybe even
in 0.8.1 too.

12345678911234567892123456789312345678941234567895123456789612345678971234567898
--
=
Paul "TBBle" Hampson
Bubblesworth Pty Ltd (ABN: 51 095 284 361)
[EMAIL PROTECTED]

The Creation of the Universe was made
possible by a grant from Texas Instruments.
-- PBS
-
Random signature generator 3.0 by Paul "TBBle" Hampson
=


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


Re: MySQL database error

2003-06-17 Thread Frank Cusack
On Wed, Jun 18, 2003 at 12:14:12AM -0500, Jeff wrote:
> Ok I installed version 0.8.1, but I still see the >
> open("/usr/local/lib/libradius-0.7.so", O_RDONLY) = 3
>  line. This would indicate-as you said that the linker is not working
> correctly? Or looking in the wrong place?
> 
> Here is the output from radiusd -X (running version 0.8.1):
> 
> [MOCKINGBIRD.ROOT][/home/jefft/freeradius-0.8.1]# radiusd -X

You are not showing strace.

/fc

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


Re: MySQL database error

2003-06-17 Thread Frank Cusack
On Wed, Jun 18, 2003 at 12:14:12AM -0500, Jeff wrote:
> Ok I installed version 0.8.1, but I still see the >
> open("/usr/local/lib/libradius-0.7.so", O_RDONLY) = 3
>  line. This would indicate-as you said that the linker is not working
> correctly? Or looking in the wrong place?

No, if you see that it means you are NOT running 0.8.1.  ie, not a
linker problem, it's user error. :-)

> Here is the output from radiusd -X (running version 0.8.1):

oh sorry, you did put in the strace, I didn't read that far.

> And strace -e open radiusd:
> [MOCKINGBIRD.ROOT][/home/jefft/freeradius-0.8.1]# strace -e open radiusd
...

This needs to be radiusd -X.  From what you've shown I can't verify what
version this is and what it's doing.  Also, you are probably not running
what you think you are.  I certainly hope '.' is not your $PATH.

/fc

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


Re: MySQL database error

2003-06-17 Thread Frank Cusack
On Wed, Jun 18, 2003 at 12:16:16AM -0500, Jeff wrote:
> and the file /usr/local/lib/rlm_sql_mysql.la:
...
> # Libraries that this one depends upon.
> dependency_libs=' -L/usr/local/lib/mysql -lmysqlclient -lz'

There you go.  Your compile time config found the mysql and zlib libs
in /usr/local/lib/mysql, but you don't have them installed there.

Either

- freeradius was built on a system with different library locations than
  the running system
- freeradius configure script is broken
- libtool problem.

Adding freeradius-devel and hoping someone can look at these possibilities.
Can you verify that the first possibility is not the problem?

/fc

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


Re: MySQL database error

2003-06-17 Thread Jeff
and the file /usr/local/lib/rlm_sql_mysql.la:

# rlm_sql_mysql.la - a libtool library file
# Generated by ltmain.sh - GNU libtool 1.4.2 (1.922.2.54 2001/09/11
03:33:37)
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='rlm_sql_mysql.so.0'

# Names of this library.
library_names='rlm_sql_mysql.so.0 rlm_sql_mysql.so rlm_sql_mysql.so'

# The name of the static archive.
old_library='rlm_sql_mysql.a'

# Libraries that this one depends upon.
dependency_libs=' -L/usr/local/lib/mysql -lmysqlclient -lz'

# Version information for rlm_sql_mysql.
current=0
age=0
revision=0

# Is this an already installed library?
installed=yes

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/usr/local/lib'

- Original Message - 
From: "Jeff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 18, 2003 12:14 AM
Subject: Re: MySQL database error


> Ok I installed version 0.8.1, but I still see the >
> open("/usr/local/lib/libradius-0.7.so", O_RDONLY) = 3
>  line. This would indicate-as you said that the linker is not working
> correctly? Or looking in the wrong place?
>
> Here is the output from radiusd -X (running version 0.8.1):
>
> [MOCKINGBIRD.ROOT][/home/jefft/freeradius-0.8.1]# radiusd -X
> Starting - reading configuration files ...
> reread_config:  reading radiusd.conf
> Config:   including file: /etc/raddb/proxy.conf
> Config:   including file: /etc/raddb/clients.conf
> Config:   including file: /etc/raddb/snmp.conf
> Config:   including file: /etc/raddb/sql.conf
>  main: prefix = "/usr/local/"
>  main: localstatedir = "/var"
>  main: logdir = "/var/log/radius"
>  main: libdir = "/usr/local//lib:/usr/local/lib"
>  main: radacctdir = "/var/log/radius/radacct"
>  main: hostname_lookups = no
>  main: max_request_time = 30
>  main: cleanup_delay = 5
>  main: max_requests = 1024
>  main: delete_blocked_requests = 0
>  main: port = 1645
>  main: allow_core_dumps = no
>  main: log_stripped_names = yes
>  main: log_file = "/var/log/radius/radius.log"
>  main: log_auth = yes
>  main: log_auth_badpass = yes
>  main: log_auth_goodpass = no
>  main: pidfile = "/var/run/radiusd/radiusd.pid"
>  main: user = "radius"
>  main: group = "radius"
>  main: usercollide = no
>  main: lower_user = "after"
>  main: lower_pass = "no"
>  main: nospace_user = "before"
>  main: nospace_pass = "before"
>  main: checkrad = "/usr/local//sbin/checkrad"
>  main: proxy_requests = no
>  proxy: retry_delay = 5
>  proxy: retry_count = 3
>  proxy: synchronous = no
>  proxy: default_fallback = yes
>  proxy: dead_time = 120
>  proxy: servers_per_realm = 15
>  security: max_attributes = 200
>  security: reject_delay = 1
>  security: status_server = no
>  main: debug_level = 0
> read_config_files:  reading dictionary
> read_config_files:  reading naslist
> read_config_files:  reading clients
> read_config_files:  reading realms
> radiusd:  entering modules setup
> Module: Library search path is /usr/local/lib:/usr/local/lib
> Module: Loaded expr
> Module: Instantiated expr (expr)
> Module: Loaded MS-CHAP
>  mschap: ignore_password = no
>  mschap: use_mppe = yes
>  mschap: require_encryption = no
>  mschap: require_strong = no
>  mschap: passwd = "(null)"
>  mschap: authtype = "MS-CHAP"
> Module: Instantiated mschap (mschap)
> Module: Loaded preprocess
>  preprocess: huntgroups = "/etc/raddb/huntgroups"
>  preprocess: hints = "/etc/raddb/hints"
>  preprocess: with_ascend_hack = no
>  preprocess: ascend_channels_per_line = 23
>  preprocess: with_ntdomain_hack = no
>  preprocess: with_specialix_jetstream_hack = no
>  preprocess: with_cisco_vsa_hack = no
> Module: Instantiated preprocess (preprocess)
> Module: Loaded CHAP
> Module: Instantiated chap (chap)
> Module: Loaded SQL
>  sql: driver = "rlm_sql_mysql"
>  sql: server = "localhost"
>  sql: port = ""
>  sql: login = "root"
>  sql: password = "password"
>  sql: radius_db = "radius"
>  sql: acct_table = "radacct"
>  sql: acct_table2 = "radacct"
>  sql: authcheck_table = "radcheck"
>  sql: authreply_table = "radreply"
>  sql: groupcheck_table = "radgroupcheck"
>  sql: groupreply_table = "radgroupreply"
>  sql: usergroup_table = "usergroup"
>  sql: nas_table = "nas"
&g

Re: MySQL database error

2003-06-17 Thread Jeff
t;, O_RDONLY)   = 6
open("/etc/raddb/dictionary", O_RDONLY) = 5
open("/etc/raddb/dictionary.compat", O_RDONLY) = 6
open("/etc/raddb/dictionary.acc", O_RDONLY) = 6
open("/etc/raddb/dictionary.ascend", O_RDONLY) = 6
open("/etc/raddb/dictionary.bay", O_RDONLY) = 6
open("/etc/raddb/dictionary.cisco", O_RDONLY) = 6
open("/etc/raddb/dictionary.cisco.vpn3000", O_RDONLY) = 6
open("/etc/raddb/dictionary.cisco.vpn5000", O_RDONLY) = 6
open("/etc/raddb/dictionary.cisco.bbsm", O_RDONLY) = 6
open("/etc/raddb/dictionary.colubris", O_RDONLY) = 6
open("/etc/raddb/dictionary.livingston", O_RDONLY) = 6
open("/etc/raddb/dictionary.microsoft", O_RDONLY) = 6
open("/etc/raddb/dictionary.nomadix", O_RDONLY) = 6
open("/etc/raddb/dictionary.quintum", O_RDONLY) = 6
open("/etc/raddb/dictionary.redback", O_RDONLY) = 6
open("/etc/raddb/dictionary.shasta", O_RDONLY) = 6
open("/etc/raddb/dictionary.shiva", O_RDONLY) = 6
open("/etc/raddb/dictionary.tunnel", O_RDONLY) = 6
open("/etc/raddb/dictionary.usr", O_RDONLY) = 6
open("/etc/raddb/dictionary.versanet", O_RDONLY) = 6
open("/etc/raddb/dictionary.erx", O_RDONLY) = 6
open("/etc/raddb/dictionary.freeradius", O_RDONLY) = 6
open("/etc/raddb/dictionary.alcatel", O_RDONLY) = 6
open("/etc/raddb/dictionary.juniper", O_RDONLY) = 6
open("/etc/raddb/dictionary.alteon", O_RDONLY) = 6
open("/etc/raddb/naslist", O_RDONLY)= 5
open("/etc/resolv.conf", O_RDONLY)  = 6
open("/etc/host.conf", O_RDONLY)= 6
open("/etc/hosts", O_RDONLY)= 6
open("/etc/raddb/clients", O_RDONLY)= 5
open("/etc/raddb/realms", O_RDONLY) = 5
open("/etc/spwd.db", O_RDONLY)  = 5
open("/etc/group", O_RDONLY)= 5


- Original Message - 
From: "Frank Cusack" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 17, 2003 11:58 PM
Subject: Re: MySQL database error


> On Tue, Jun 17, 2003 at 10:40:57PM -0500, Jeff wrote:
> > [MOCKINGBIRD.ROOT][/home/jefft]# strace -e open radiusd
>
> really should have done radiusd -X, but still the info here is good:
>
> > open("/usr/local/lib/libradius-0.7.so", O_RDONLY) = 3
>
> first of all, this is freeradius 0.7, not 0.8.1 or CVS (CVS will say
> 0.8.1 as well)
>
> ...
>
> > open("/usr/local/lib/rlm_sql.la", O_RDONLY) = 5
> > open("/usr/local/lib/rlm_sql.a", O_RDONLY) = 5
> > open("/usr/local/lib/rlm_sql-0.7.so", O_RDONLY) = 5
> > open("/usr/local/lib/rlm_sql_mysql.la", O_RDONLY) = 5
> > open("/usr/local/lib/libz.la", O_RDONLY) = -1 ENOENT (No such file or
> > directory)
>
> Can you show me the contents of /usr/local/lib/rlm_sql_mysql.la ?
> (It's a text file)
>
> > open("/usr/local/lib/libz.la", O_RDONLY) = -1 ENOENT (No such file or
> > directory)
> > open("/usr/local/lib/libz.la", O_RDONLY) = -1 ENOENT (No such file or
> > directory)
> > open("/lib/libz.la", O_RDONLY)  = -1 ENOENT (No such file or
> > directory)
> > open("/usr/lib/libz.la", O_RDONLY)  = -1 ENOENT (No such file or
> > directory)
> > open("libz.la", O_RDONLY)   = -1 ENOENT (No such file or
> > directory)
> > open("/usr/local/lib/libmysqlclient.la", O_RDONLY) = -1 ENOENT (No such
file
> > or directory)
> > open("/usr/local/lib/libmysqlclient.la", O_RDONLY) = -1 ENOENT (No such
file
> > or directory)
> > open("/usr/local/lib/libmysqlclient.la", O_RDONLY) = -1 ENOENT (No such
file
> > or directory)
> > open("/lib/libmysqlclient.la", O_RDONLY) = -1 ENOENT (No such file or
> > directory)
> > open("/usr/lib/libmysqlclient.la", O_RDONLY) = -1 ENOENT (No such file
or
> > directory)
> > open("libmysqlclient.la", O_RDONLY) = -1 ENOENT (No such file or
> > directory)
>
> So the problem should be clear ... the mysql lib either cannot be
> found, or the runtime linker is not configured properly, or the library
> path is not encoded into the rlm_sql_mysql library properly.
>
> > open("/usr/local/lib/rlm_sql_mysql.a", O_RDONLY) = 5
> > open("/usr/local/lib/rlm_sql_mysql.so.0", O_RDONLY) = 5
>
> This is not a versioned library; an indicator that this is not the CVS
> freeradiusd.  (But we already knew that.)
>
> > open("/usr/lib/libmysqlclient.so.10", O_RDONLY) = 5
> > open("/usr/lib/libz.so.2", O_RDONLY)= 5
>
> So here, you can see libz was found.  It's hard to tell exactly from
> this trace, but it's likely that this one is found because the system
> libmysqlclient is correct while the freeradius module is incorrect
> (regarding the library path).
>
> You'll need to post 0.8.1 results (or preferrably CVS) for me to go
> further.  I'm not interested in looking at 0.7 issues.
>
> /fc
>
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
>


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


Re: MySQL database error

2003-06-17 Thread Frank Cusack
On Tue, Jun 17, 2003 at 10:40:57PM -0500, Jeff wrote:
> [MOCKINGBIRD.ROOT][/home/jefft]# strace -e open radiusd

really should have done radiusd -X, but still the info here is good:

> open("/usr/local/lib/libradius-0.7.so", O_RDONLY) = 3

first of all, this is freeradius 0.7, not 0.8.1 or CVS (CVS will say
0.8.1 as well)

...

> open("/usr/local/lib/rlm_sql.la", O_RDONLY) = 5
> open("/usr/local/lib/rlm_sql.a", O_RDONLY) = 5
> open("/usr/local/lib/rlm_sql-0.7.so", O_RDONLY) = 5
> open("/usr/local/lib/rlm_sql_mysql.la", O_RDONLY) = 5
> open("/usr/local/lib/libz.la", O_RDONLY) = -1 ENOENT (No such file or
> directory)

Can you show me the contents of /usr/local/lib/rlm_sql_mysql.la ?
(It's a text file)

> open("/usr/local/lib/libz.la", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> open("/usr/local/lib/libz.la", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> open("/lib/libz.la", O_RDONLY)  = -1 ENOENT (No such file or
> directory)
> open("/usr/lib/libz.la", O_RDONLY)  = -1 ENOENT (No such file or
> directory)
> open("libz.la", O_RDONLY)   = -1 ENOENT (No such file or
> directory)
> open("/usr/local/lib/libmysqlclient.la", O_RDONLY) = -1 ENOENT (No such file
> or directory)
> open("/usr/local/lib/libmysqlclient.la", O_RDONLY) = -1 ENOENT (No such file
> or directory)
> open("/usr/local/lib/libmysqlclient.la", O_RDONLY) = -1 ENOENT (No such file
> or directory)
> open("/lib/libmysqlclient.la", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> open("/usr/lib/libmysqlclient.la", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> open("libmysqlclient.la", O_RDONLY) = -1 ENOENT (No such file or
> directory)

So the problem should be clear ... the mysql lib either cannot be
found, or the runtime linker is not configured properly, or the library
path is not encoded into the rlm_sql_mysql library properly.

> open("/usr/local/lib/rlm_sql_mysql.a", O_RDONLY) = 5
> open("/usr/local/lib/rlm_sql_mysql.so.0", O_RDONLY) = 5

This is not a versioned library; an indicator that this is not the CVS
freeradiusd.  (But we already knew that.)

> open("/usr/lib/libmysqlclient.so.10", O_RDONLY) = 5
> open("/usr/lib/libz.so.2", O_RDONLY)= 5

So here, you can see libz was found.  It's hard to tell exactly from
this trace, but it's likely that this one is found because the system
libmysqlclient is correct while the freeradius module is incorrect
(regarding the library path).

You'll need to post 0.8.1 results (or preferrably CVS) for me to go
further.  I'm not interested in looking at 0.7 issues.

/fc

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


Re: MySQL database error

2003-06-17 Thread Jeff
And here's some more output, this is my buffer after trying to login to my
NAS using the 'jefft' account I created in mysql database 'radius'

rad_recv: Access-Request packet from host 204.57.72.47:1026, id=19,
length=57
User-Name = "jefft"
User-Password = "\207C\017J\366\353\253\221\231Z8\370)M\377\336"
NAS-IP-Address = 204.57.72.47
NAS-Port = 99
rlm_chap: Could not find proper Chap-Password attribute in request
rlm_sql: Reserving sql socket id: 2
query:  SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username =
'jefft' ORDER BY id
query:  SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupche
ck.Value,radgroupcheck.op  FROM radgroupcheck,usergroup WHERE
usergroup.Username = 'jefft' AND usergroup.GroupName =
radgroupcheck.GroupName ORDER BY radgroupcheck.id
query:  SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username =
'jefft' ORDER BY id
query:  SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgrouprep
ly.Value,radgroupreply.op  FROM radgroupreply,usergroup WHERE
usergroup.Username = 'jefft' AND usergroup.GroupName =
radgroupreply.GroupName ORDER BY radgroupreply.id
query:
MYSQL check_error: 1065 received
rlm_sql_authorize: database query error
rlm_sql: Released sql socket id: 2
rad_recv: Access-Request packet from host 204.57.72.47:1026, id=19,
length=57
Sending Access-Reject of id 19 to 204.57.72.47:1026
rad_recv: Access-Request packet from host 204.57.72.47:1026, id=20,
length=57
User-Name = "jefft"
User-Password =
"\345\253q\320\006\243\271\222)\314\246\326x\250\357\242"
NAS-IP-Address = 204.57.72.47
NAS-Port = 99
rlm_chap: Could not find proper Chap-Password attribute in request
rlm_sql: Reserving sql socket id: 1
query:  SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username =
'jefft' ORDER BY id
query:  SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupche
ck.Value,radgroupcheck.op  FROM radgroupcheck,usergroup WHERE
usergroup.Username = 'jefft' AND usergroup.GroupName =
radgroupcheck.GroupName ORDER BY radgroupcheck.id
query:  SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username =
'jefft' ORDER BY id
query:  SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgrouprep
ly.Value,radgroupreply.op  FROM radgroupreply,usergroup WHERE
usergroup.Username = 'jefft' AND usergroup.GroupName =
radgroupreply.GroupName ORDER BY radgroupreply.id
query:
MYSQL check_error: 1065 received
rlm_sql_authorize: database query error
rlm_sql: Released sql socket id: 1
rad_recv: Access-Request packet from host 204.57.72.47:1026, id=20,
length=57
Sending Access-Reject of id 20 to 204.57.72.47:1026




- Original Message - 
From: "Frank Cusack" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 17, 2003 10:35 PM
Subject: Re: MySQL database error


> On Tue, Jun 17, 2003 at 10:16:55PM -0500, Jeff Thompson - World Net
Technical Support wrote:
> > This was covered all yesterday, but here is the output of radiusd -x
when
>
> See below
>
> > > On Tue, Jun 17, 2003 at 07:30:57PM -0500, Jeff Thompson - World Net
> > > Technical Support wrote:
> > >> Can someone give me some ideas here? 0.7 is the only version I can
get
> > >> to work on FreeBSD, but would like to use .8.1 if it would load the
> > >> mysql modules. Anyone?
> > >
> > > It'd be good if you could post the radiusd -X intermingled with strace
> > > output.  (Whatever the strace equiv is on FreeBSD.)
>
> You missed that last part.  Actually, just the 'strace -e open'
equivalent.
> Just plain strace would be too noisy.
>
> /fc
>
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
>


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


Re: MySQL database error

2003-06-17 Thread Jeff
RDONLY)= 5
open("/usr/lib/libm.so.2", O_RDONLY)= 5
open("/var/log/radius/radius.log", O_WRONLY|O_APPEND|O_CREAT, 0666) = 5
open("/var/log/radius/radius.log", O_WRONLY|O_APPEND|O_CREAT, 0666) = 5
open("/var/log/radius/radius.log", O_WRONLY|O_APPEND|O_CREAT, 0666) = 5
open("/etc/services", O_RDONLY) = 5
open("/usr/local/share/mysql/charsets/Index", O_RDONLY) = 6
open("/var/log/radius/radius.log", O_WRONLY|O_APPEND|O_CREAT, 0666) = 6
open("/var/log/radius/radius.log", O_WRONLY|O_APPEND|O_CREAT, 0666) = 7
open("/var/log/radius/radius.log", O_WRONLY|O_APPEND|O_CREAT, 0666) = 8
open("/var/log/radius/radius.log", O_WRONLY|O_APPEND|O_CREAT, 0666) = 9
open("/usr/local/lib/rlm_files.la", O_RDONLY) = 10
open("/usr/local/lib/rlm_files.a", O_RDONLY) = 10
open("/usr/local/lib/rlm_files-0.7.so", O_RDONLY) = 10
open("/etc/raddb/users", O_RDONLY)  = 10
open("/etc/raddb/acct_users", O_RDONLY) = 10
open("/usr/local/lib/rlm_realm.la", O_RDONLY) = 10
open("/usr/local/lib/rlm_realm.a", O_RDONLY) = 10
open("/usr/local/lib/rlm_realm-0.7.so", O_RDONLY) = 10
open("/usr/local/lib/rlm_radutmp.la", O_RDONLY) = 10
open("/usr/local/lib/rlm_radutmp.a", O_RDONLY) = 10
open("/usr/local/lib/rlm_radutmp-0.7.so", O_RDONLY) = 10
open("/etc/spwd.db", O_RDONLY)  = 10
open("/etc/group", O_RDONLY)= 10

- Original Message - 
From: "Frank Cusack" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 17, 2003 10:35 PM
Subject: Re: MySQL database error


> On Tue, Jun 17, 2003 at 10:16:55PM -0500, Jeff Thompson - World Net
Technical Support wrote:
> > This was covered all yesterday, but here is the output of radiusd -x
when
>
> See below
>
> > > On Tue, Jun 17, 2003 at 07:30:57PM -0500, Jeff Thompson - World Net
> > > Technical Support wrote:
> > >> Can someone give me some ideas here? 0.7 is the only version I can
get
> > >> to work on FreeBSD, but would like to use .8.1 if it would load the
> > >> mysql modules. Anyone?
> > >
> > > It'd be good if you could post the radiusd -X intermingled with strace
> > > output.  (Whatever the strace equiv is on FreeBSD.)
>
> You missed that last part.  Actually, just the 'strace -e open'
equivalent.
> Just plain strace would be too noisy.
>
> /fc
>
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
>


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


Re: MySQL database error

2003-06-17 Thread Frank Cusack
On Tue, Jun 17, 2003 at 10:16:55PM -0500, Jeff Thompson - World Net Technical Support 
wrote:
> This was covered all yesterday, but here is the output of radiusd -x when

See below

> > On Tue, Jun 17, 2003 at 07:30:57PM -0500, Jeff Thompson - World Net
> > Technical Support wrote:
> >> Can someone give me some ideas here? 0.7 is the only version I can get
> >> to work on FreeBSD, but would like to use .8.1 if it would load the
> >> mysql modules. Anyone?
> >
> > It'd be good if you could post the radiusd -X intermingled with strace
> > output.  (Whatever the strace equiv is on FreeBSD.)

You missed that last part.  Actually, just the 'strace -e open' equivalent.
Just plain strace would be too noisy.

/fc

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


Re: MySQL database error

2003-06-17 Thread Jeff Thompson - World Net Technical Support
This was covered all yesterday, but here is the output of radiusd -x when
compiled using the source tarball from freeradius.org using ./configure 
--with-raddbdir=/etc/raddb --with-logdir=/var/log/radius:
[MOCKINGBIRD.ROOT][/home/jefft/freeradius-0.8.1]# radiusd -x
Starting - reading configuration files ...
Module: Loaded expr
Module: Instantiated expr (expr)
Module: Loaded MS-CHAP
Module: Instantiated mschap (mschap)
Module: Loaded preprocess
Module: Instantiated preprocess (preprocess)
Module: Loaded CHAP
Module: Instantiated chap (chap)
Module: Loaded SQL
rlm_sql (sql): Could not link driver rlm_sql_mysql: file not found
rlm_sql (sql): Make sure it (and all its dependent libraries!) are in the
search path of your system's ld.
radiusd.conf[14]: sql: Module instantiation failed.

I go to the ports collection provided with FreeBSD
(/usr/ports/net/freeradius/work/freeradius-0.7) and run the SAME configure
line:
./configure --with-raddbdir=/etc/raddb --with-logdir=/var/log/radius

It builds, installs and loads the sql module with no problem:
[MOCKINGBIRD.ROOT][/usr/ports/net/freeradius/work/freeradius-0.7]# radiusd -x
Starting - reading configuration files ...
Module: Loaded MS-CHAP
Module: Instantiated mschap (mschap)
Module: Loaded preprocess
Module: Instantiated preprocess (preprocess)
Module: Loaded CHAP
Module: Instantiated chap (chap)
Module: Loaded SQL
rlm_sql: Driver rlm_sql_mysql loaded and linked
rlm_sql: Attempting to connect to [EMAIL PROTECTED]:/radius
rlm_sql: starting 0
rlm_sql:  Attempting to connect #0
rlm_sql: Starting connect to MySQL server for #0
rlm_sql:  Connected new DB handle, #0
rlm_sql: starting 1
rlm_sql:  Attempting to connect #1
rlm_sql: Starting connect to MySQL server for #1
rlm_sql:  Connected new DB handle, #1
rlm_sql: starting 2
rlm_sql:  Attempting to connect #2
rlm_sql: Starting connect to MySQL server for #2
rlm_sql:  Connected new DB handle, #2
rlm_sql: starting 3
rlm_sql:  Attempting to connect #3
rlm_sql: Starting connect to MySQL server for #3
rlm_sql:  Connected new DB handle, #3
rlm_sql: starting 4
rlm_sql:  Attempting to connect #4
rlm_sql: Starting connect to MySQL server for #4
rlm_sql:  Connected new DB handle, #4
Module: Instantiated sql (sql)
Module: Loaded files
[/etc/raddb/users]:80 Cistron compatibility checks for entry steve ...
[/etc/raddb/users]:150 Cistron compatibility checks for entry DEFAULT ...
[/etc/raddb/users]:169 Cistron compatibility checks for entry DEFAULT ...
[/etc/raddb/users]:181 Cistron compatibility checks for entry DEFAULT ...
[/etc/raddb/users]:188 Cistron compatibility checks for entry DEFAULT ...
[/etc/raddb/users]:195 Cistron compatibility checks for entry DEFAULT ...
Module: Instantiated files (files)
Module: Loaded realm
Module: Instantiated realm (suffix)
Module: Loaded radutmp
Module: Instantiated radutmp (radutmp)
Initializing the thread pool...
Listening on IP address *, ports 1645/udp and 1646/udp.
Ready to process requests.


I have tried all of the ./configure switches to try and get .8 or .8.1 to
load the rlm_sql_mysql module-but it will not. I KNOW this module is
installing, but when radiusd goes to start it crashes. I REALLY need to
get this working with mysql, but cannot make heads or tails of the
problems I am having...


> On Tue, Jun 17, 2003 at 07:30:57PM -0500, Jeff Thompson - World Net
> Technical Support wrote:
>> Can someone give me some ideas here? 0.7 is the only version I can get
>> to work on FreeBSD, but would like to use .8.1 if it would load the
>> mysql modules. Anyone?
>
> It'd be good if you could post the radiusd -X intermingled with strace
> output.  (Whatever the strace equiv is on FreeBSD.)
>
> /fc
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html




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


Re: MySQL database error

2003-06-17 Thread Frank Cusack
On Tue, Jun 17, 2003 at 07:30:57PM -0500, Jeff Thompson - World Net Technical Support 
wrote:
> Can someone give me some ideas here? 0.7 is the only version I can get to
> work on FreeBSD, but would like to use .8.1 if it would load the mysql
> modules. Anyone?

It'd be good if you could post the radiusd -X intermingled with strace
output.  (Whatever the strace equiv is on FreeBSD.)

/fc

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


MySQL database error

2003-06-17 Thread Jeff Thompson - World Net Technical Support
After spending most of the day yesterday fooling with freeradius0.8.1-I
isntalled 0.7 and got it to load the sql module with no problems! Howver,
when trying to authenticate it using an SQL database entry I get the
following:
Wed Jun 18 02:25:33 2003 : Error: rlm_sql_authorize: database query error

Logged into my radius.log. I can authenticate fine using the 'users' file,
but not using the sql database. I looked around the net and found others
who had this problem solved it by upgrading to .8 or .8.1-but I have tried
both and cannot get either one to load the sql module correctly

Can someone give me some ideas here? 0.7 is the only version I can get to
work on FreeBSD, but would like to use .8.1 if it would load the mysql
modules. Anyone?



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