mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
commandline adduser tool (to solve all that default username malarky!)
git-svn-id: http://www.observium.org/svn/observer/trunk@185 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
15
adduser.php
Executable file
15
adduser.php
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
include("config.php");
|
||||
include("includes/functions.php");
|
||||
|
||||
if($argv[1] && $argv[2] && $argv[3]) {
|
||||
|
||||
mysql_query("INSERT INTO `users` (`username`,`password`,`level`) VALUES ('".$argv[1]."',MD5('".$argv[2]."'),'".$argv[3]."')");
|
||||
|
||||
} else {
|
||||
echo("Add User Tool\nUsage: ./adduser.php <username> <password> <level 0-10>\n");
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user