well, i created the string with a linux-tool on the radius-server (freeradius). It is used as:
cryptpasswd --md5 <password>.

Ruud Kerstens.

this is the cryptpasswd  perlscript below (not farmiliar with perl) :

#...@perl@
#
# cryptpasswd   Generate or check md5 and DES hashed passwords.
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#    Copyright (C) 2001 The FreeRADIUS Project   http://www.freeradius.org
#
#    Written by Miquel van Smoorenburg <miqu...@cistron-office.nl>
#
#    $Id: cryptpasswd.in,v 1.1 2001/09/28 14:04:29 aland Exp $
#

use Getopt::Long;

sub check_des {
        return (crypt("fnord", "aa") =~ m/^aa/);
}

sub check_md5 {
        return (crypt("fnord", "\$1\$aa") =~ m/^\$1\$/);
}

sub usage {
die "Usage: cryptpasswd [--des|--md5|--check] plaintext_password [crypted_password]\n";
}

@saltc = ( '.', '/', '0'..'9', 'A'..'Z', 'a'..'z' );

#
#       MAIN
#
sub main {

        Getopt::Long::Configure("no_ignore_case", "bundling");
        my @options = ( "des|d+", "md5|m+", "check|c+" );
        usage() unless (eval { Getopt::Long::GetOptions(@options) } );

        if ($opt_check) {
                usage unless ($#ARGV == 1);
                if (crypt($ARGV[0], $ARGV[1]) ne $ARGV[1]) {
                        print "Password BAD\n";
                        return 0;
                } else {
                        print "Password OK\n";
                        return 1;
                }
        }

        usage() unless ($opt_des || $opt_md5);
        usage() unless ($#ARGV == 0);

        die "DES password hashing not available\n"
                if ($opt_des && !check_des());
        die "MD5 password hashing not available\n"
                if ($opt_md5 && !check_md5());

        $salt = ($opt_md5 ? '$1$' : '');
        for ($i = 0; $i < ($opt_md5 ? 8 : 2); $i++) {
                $salt .= $saltc[rand 64];
        }
        $salt .= '$' if ($opt_md5);
        print crypt($ARGV[0], $salt), "\n";

        1;
}

exit !main();


--------------------------------------------------
From: "Arno Garrels" <arno.garr...@gmx.de>
Sent: Saturday, November 21, 2009 9:33 PM
To: "ICS support mailing" <twsocket@elists.org>
Subject: Re: [twsocket] MD5 passwords

Ruud Kerstens wrote:

the password 'test' should generate :
$1$/mMVthpE$sgNAe9PaR0ORB1YCc1CVq1

A MD5 checksum/hash value is an array of 16 bytes, mostly
represented as a hex string, that's what StrMD5() returns.
The MD5 of "test" as a hex string looks like
"7318EFC576D8C24B47540D5ACFD58E5A"
The same MD5 Base64 encoded was "cxjvxXbYwktHVA1az9WOWg=="

I'm sorry, I've currently no idea what encoding might have
produced the string you posted above?

Someone else?

--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to