[freeside] Adding realm to end of username in radius export

Joseph Tanner josetann at yahoo.com
Mon May 12 11:42:26 PDT 2003

Thanks for the pointers.  I've basically cloned
sqlradius.pm into sqlradiusrealm.pm and did not set
the nodomain flag in part_export.pm.  However it's
working the exact same way that sqlradius.pm did. 
Reading the manpages it looks as though not setting
the nodomain flag would have the domain added to the
username automatically, so username would now equal
username at domain.  Apparently I'm wrong here, or it
doesn't see the domain I'm trying to use.  The domain
does not show up in the svc_acct table but domsvc is
set to "1" which corresponds to the right domain in
svc_domain (and the service shows up as
username at domain.com in freeside so I'm led to believe
it's setup correctly).

Alternatively I've tried using the domsvc variable in
the query, as if it worked correctly I could hack
sqlradius.pm to substitute the actual domain in place
of the number.  No luck there, I'm guessing that
variable isn't passed to it in the first place.

Basically what I'm trying to do is create two domains
in freeside, and have two dialup services offered (one
for each domain).  Reason I have to have two domains
is because I will offer two dialup services, one with
a smaller POP base but cheaper, and one with a larger
POP base and of course, more expensive.  If I did not
have the realm set in freeradius's database, a user
who should be on the cheaper plan may authenticate
both on it and again on the more expensive plan,
making me pay for two accounts (I'm reselling dialup
services, and use pass-thru radius).  Testing the
freeradius server shows me that all I have to have set
in the database is the Username, Attribute, and Value
fields in radcheck.  Once I get that going I can go

Again thanks for your help, I'll get this going one
way or the other :)

--- ivan at 420.am wrote:
> Using or modifying the sqlradius export to do that
> is not a good idea
> as it would break the username duplicate checking.
> The correct solution would be to add an
> sqlradius_withdomain export that
> did what you're looking for (possibly with options
> like the old
> username_policy).  sqlradius_withdomain would be a
> subclass of the
> current sqlradius, but without the "nodomain" flag
> set in the export
> definition.
> As always, patches are appriciated.
> -- 
> _ivan
> On Sun, May 11, 2003 at 02:20:44PM -0700, Joseph
> Tanner wrote:
> > Hello, I've been trying to get usernames exported
> to
> > my freeradius mysql database in the format of
> > "username at domain.com" instead of just "username". 
> > I've tried editing the sqlradius.pm file and was
> > successful in getting it to work when running the
> > freeside-sqlradius-reset command, however it does
> not
> > work with the normal export (still comes out as
> > username instead of username at domain.com).  I've
> > searched for the answer already (that's why I
> fiddled
> > with sqlradius.pm) but I'm just not getting it
> right. 
> > Can anyone point me in the right direction?
> > 
> > Here's the required info.  Version is 1.4.1rc2,
> using
> > HTML::Mason (with the 1.0x handler), all needed
> > software is installed (as the software does work
> as
> > intended), OS is a mix between Mandrake 9.0 and
> 9.1
> > (most everything but the kernel has been upgraded
> to
> > the 9.1 version), Postgresql is ver7.3, DBI and
> > are the newest versions available.
> > 
> > Thanks for any help!
> > 
> > __________________________________
> > Do you Yahoo!?
> > The New Yahoo! Search - Faster. Easier. Bingo.
> > http://search.yahoo.com
> -- 
> _ivan

Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

More information about the freeside-users mailing list