Wed Sep 19 11:09:25 2001:1000861765:1234567891::123456:FAIL
Wed Sep 19 11:38:21 2001:1000863501:1234567891::123456:FAIL
this was working on local
PreAuthHook sub { %U=> %P;chop(%P);chop(%P);chop(%P);chop(%P);}
Hugh Irvine wrote:
Hello -On Tuesday 18 September 2001 12:46, Tech wrote:
> I am using radiator as a proxy only, but I have a problem, one of my
> logins never has a password and I have to roll part of the username to
> %P this is ok for local use but not when ongoing presentation to the
> proxy.
>
> Suggestions or specific examples would be appreciated.
>I think you will have to do this with a PreAuthHook, something like this:
# -*- mode: Perl -*-
# addUsernameAsPassword
#
# PreAuthHook to add a Password attribute
# to an Access-Request.
# The User-Name is used for the Password.
# Note that the Password must be encoded
# with the shared secret of the original NAS.
#
# Author: Hugh Irvine ([EMAIL PROTECTED])
# Copyright (C) 2001 Open System Consultants
#sub
{
my $p = ${$_[0]};
my $rp = ${$_[1]};# Get the request code.
my $code = $p->code;if ($code eq 'Access-Request')
{
my $secret = $p->{Client}->{Secret};
$password = &Radius::Radius::encode_password
($p->{User-Name}, $secret);
$p->add_attr('Password', $password);
}
return;
}Your configuration file would look something like this:
# define Realm(s) or Handler(s)
<Realm .....>
.....
PreAuthHook file:"%D/addUsernameAsPassword"
.....
>/Realm>I haven't tested the code, but you should get the idea.
Please let me know how you get on.
regards
Hugh
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.
