Hello Pedro,

Tuesday, June 04, 2002, 11:54:52 PM, you wrote:

>> 
>> What's the way to encrypt the passwords in the database. 
>> 
>> I am using...
>> 
>> mysql> update radcheck set value = encrypt('pptp2002') where id = 730;
>> 
>> +-----+----------+-------------+---------------+------+
>> | id  | UserName | Attribute   | Value         | op   |
>> +-----+----------+-------------+---------------+------+
>> | 732 | pptp     | Auth-Type   | MS-CHAP       | :=   |
>> | 730 | pptp     | NT-Password | uFdiBao.l.ijQ | :=   |
>> +-----+----------+-------------+---------------+------+


Sorry fo bad english
You not read my previuos letter :(
I detaily give you my working configuration for MS-CHAP + pptp


NT-Password is NOT encrypt password :(


Use program by [EMAIL PROTECTED] (big thanks)

put it to rlm_mschap and compile

gcc -o smbencrypt deskey.c desport.c smbencrypt.c md4c.c


$ smbencrypt qwerty        <-Pass 'qwerty'
LM Hash                                 NT Hash
--------------------------------        --------------------------------
598DDCE2660D3193AAD3B435B51404EE        2D20D252A479F485CDF5E171D93985BF

Now do
>> mysql> update radcheck set value = '2D20D252A479F485CDF5E171D93985BF' where id = 
>730;

>select id,UserName,Attribute,Value,op from radcheck where UserName='q1test';
+-----+----------+-------------+----------------------------------+------+
| id  | UserName | Attribute   | Value                            | op   |
+-----+----------+-------------+----------------------------------+------+
| 310 | q1test   | NT-Password | 2D20D252A479F485CDF5E171D93985BF | :=   |
+-----+----------+-------------+----------------------------------+------+
1 row in set (0.00 sec)



Change in sql.conf

authenticate_query = "SELECT Value,Attribute FROM ${authcheck_table} WHERE UserName =
'%{User-Name}' AND ( Attribute = 'User-Password' OR Attribute = 'Password' OR 
Attribute =
'Crypt-Password' OR Attribute = 'NT-Password') ORDER BY Attribute DESC"





-- 
Best regards,
 rust                            mailto:[EMAIL PROTECTED]

Attachment: smbencrypt.c
Description: Binary data

Reply via email to