5 * This file is designed as a "script" extension to freeradius (or some such tool) for radius authentication.
6 * Also provided is a simple web interface for managing users in freeradius.
8 * The simple web interface should also provide a mechanism for configuring freeradius itself
12 require_once("lib/authClient.php");
14 $myAC = new GAAuthClient();
17 define("MSG_AUTH_USER_TOKEN", 1);
18 define("MSG_ADD_USER_TOKEN", 2);
19 define("MSG_DELETE_USER", 3);
20 define("MSG_AUTH_USER_PASSWORD", 4);
21 define("MSG_SET_USER_PASSWORD", 5);
22 define("MSG_SET_USER_REALNAME", 6);
23 define("MSG_SET_USER_TOKEN", 7);
24 define("MSG_SET_USER_TOKEN_TYPE", 8);
28 if(isset($argv[1])) $prep = $argv[1];
29 echo "Creating 10000 users using ".$argv[1]."\n";
30 for($i=0; $i<10000; $i++) {
31 if(($i%100)==0) echo "up to, $i\n";
32 $username = "$prep$i";
33 $myAC->addUser($username);