How to enter users in sql?
Guy Fraser
guy at incentre.net
Wed May 27 20:12:06 CEST 2009
On 2009-May-27, at 11:51, Just E. Mail wrote:
> I have successfully setup a freeRADIUS server with PostgreSQL
> backend (separate) server. When I start freeRADIUS in test mode
> 'radiusd -X', it connects to the sql server and there is no error. I
> have two general questions:
>
> 1. I need to add one or two test UID & PW in the SQL database. Is
> there a GUI application available to accomplish that or I have to do
> it manually entering the data?
>
You could try to use the dialup_admin php interface that is included
with
FreeRadius source.
It did not meet our needs so I wrote one for in house use.
> 2. When the freeRADIUS server is live (on-line) how does user
> authentication data gets added into the database? In MD5, LINUX has
> an application to add USER Name & Group (created automatically)
> which both email program (such as Postfix) and freeRADIUS
> authenticate against. How is it done in PostgreSQL?
>
FreeRadius uses the standard libcrypt routines.
Here is a snipet of code from the PHP interface I wrote :
####
function check_password ($test_pass,$old_encrypted) {
if(crypt($test_pass,$old_encrypted) == $old_encrypted) {
//echo "Password matches<BR>";
return(true);
} else {
//echo "Passwowd does not match<BR>";
return(false);
}
}
function gen_password ($new_pass) {
$encrypted = crypt($new_pass);
return($encrypted);
}
####
> I have tried to post this question as clearly as I can. Please ask
> and clarification!
>
> Jennifer K.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
--
Guy Fraser
Network Administrator
The Internet Centre
1-888-450-6787
(780)450-6787
More information about the Freeradius-Users
mailing list