Unable to properly use stored crypted passwords in Radiator/Radmin... Date: Thu, 4 Oct 2001 12:31:56 -0400

Colin D. Easton ceaston at attcanada.ca
Tue Jun 24 01:17:42 CDT 2008


Hi,

I've upgraded from Radiator 2.8.2/Radmin 1.4 where I've stored crypted
UNIX passwords in an SQL db.

i.e. username x has a stored password of {crypt}xxxxxxxx

I tested the new release of Radiator 2.8.3/Radmin 1.5 where the stored
password is able to be crypted by default but the routines store just
the xxxxxxxx password in crypted format.

I was able to change my password and the routines below worked ok,
however I was then unable to login or authenticate.  What am I missing?

Colin


.../Radmin/Site.pm snippet which allows stored insert/updates of crypted
passwords in Radiator/Radmin:

# Here are some sample hooks that maintain PASS_WORD in the RADUSERS
# table
# as the Unix encrypted version of the plaintext password
# entered by the user.

###################################################################
# Heres an example pre_insert_hook.
# Change the new password to Unix crypt before insertion
sub db_pre_insert_hook
{
    my ($db, $newobj) = @_;

    # Change the new plaintext password to Unix crypt
    $newobj->{PASS_WORD} =
         &Radmin::Util::unixEncryptPassword($newobj->{PASS_WORD})
        if $newobj->{Type} eq 'RADUSERS';
}

###################################################################
# Heres an example pre_update_hook.
# If the password has been changed, re-encrypt it
sub db_pre_update_hook
{
    my ($db, $newobj, $oldobj) = @_;

    # If the password is not 13 chars, its been changed
    # to a new one: reencrypt
    $newobj->{PASS_WORD} =
       &Radmin::Util::unixEncryptPassword($newobj->{PASS_WORD})
        if $newobj->{Type} eq 'RADUSERS'
            && length $newobj->{PASS_WORD} != 13;
}

1;

-------------------------------------------------------
===
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