(RADIATOR) passwords

Hugh Irvine hugh at open.com.au
Tue Sep 18 01:52:29 CDT 2001


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 (hugh at open.com.au)
# 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 radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list