time to re-code the auth server from scratch
[ga4php.git] / archive / authserver_v1.0 / create1000users.php
diff --git a/archive/authserver_v1.0/create1000users.php b/archive/authserver_v1.0/create1000users.php
new file mode 100644 (file)
index 0000000..0be09b9
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+/*
+ * 
+ * 
+ * This file is designed as a "script" extension to freeradius (or some such tool) for radius authentication.
+ * Also provided is a simple web interface for managing users in freeradius.
+ * 
+ * The simple web interface should also provide a mechanism for configuring freeradius itself
+ * 
+ */
+
+require_once("lib/authClient.php");
+
+$myAC = new GAAuthClient();
+
+/*
+define("MSG_AUTH_USER_TOKEN", 1);
+define("MSG_ADD_USER_TOKEN", 2);
+define("MSG_DELETE_USER", 3);
+define("MSG_AUTH_USER_PASSWORD", 4);
+define("MSG_SET_USER_PASSWORD", 5);
+define("MSG_SET_USER_REALNAME", 6);
+define("MSG_SET_USER_TOKEN", 7);
+define("MSG_SET_USER_TOKEN_TYPE", 8);
+
+ */
+$prep = "created";
+if(isset($argv[1])) $prep = $argv[1];
+echo "Creating 10000 users using ".$argv[1]."\n";
+for($i=0; $i<10000; $i++) {
+       if(($i%100)==0) echo "up to, $i\n";
+       $username = "$prep$i";
+       $myAC->addUser($username);
+}
+?>