Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#91132 - 29/04/2002 11:01 Anybody here work with RADIUS?
cwillenbrock
enthusiast

Registered: 30/12/2000
Posts: 249
Loc: Dover, NJ
I'm trying to script adding/removing users from a RADIUS server using PHP and I'm not having much luck finding documentation anywhere that can help me. I found this script that connects to a port on the RADIUS server and sends commands to change a password for a user....now I need to know how to add/delete users.

Anyone know about this, or could point me to the right place for documentation?


$passd = fsockopen($server, $port, &$errno, &$errstr);
$input = fgets($passd, 128);
if(!eregi( "^200", $input)){
fclose($passd);
$errortype="no_connect";
}
$output = "user ". $user . "\n";
fputs($passd,$output);
$input = fgets($passd, 128);
if(!eregi( "^200", $input)){
fclose($passd);
$errortype="$input";
}
$output = "pass " . $old_pass . "\n";
fputs($passd,$output);
$input = fgets($passd, 128);
if(!eregi( "^200", $input)){
fclose($passd);
$errortype="$input";
}
$output = "newpass $new_pass\n";
fputs($passd,$output);
$input = fgets($passd, 128);
if(!eregi( "^200", $input)){
fclose($passd);
$errortype="$input";
}
$output = "quit\n";
fputs($passd,$output);
$input = fgets($passd, 128);
if(!eregi( "^200", $input)){
fclose($passd);
$errortype="$input";
}
fclose($passd);



_________________________
- Chris Orig. Empeg Queue position 2

Top
#91133 - 29/04/2002 13:29 Re: Anybody here work with RADIUS? [Re: cwillenbrock]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
I could be wrong, but I don't think RADIUS provides a facility to delete users via the RADIUS protocol.

Regardless, RADIUS is defined in RFC2865, and there are additional documents about it in the following four RFCs.
_________________________
Bitt Faulk

Top