diff --git a/README.md b/README.md index b32a14d..e301cfa 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,26 @@ In order to use the remote shutdown functionality you have to give the user `www [...] ``` +#### Disabling password login + +If your RaspberryPi is on a private part of the network and you don't want to use a password, you can disable it. +To do this, in the `local.config` file, set the `loginWithPassword` parameter to `0`. +If there is no `loginWithPassword` parameter in your `local.config` file, simply add it after the `pass` option. + +Example: +``` +[...] + 'general' => + array ( + [...] + 'pass' => 'YOUR_MD5_PASSPHRASE_HERE', + 'loginWithPassword' => '0', + [...] + ), +[...] +``` + +4. Remember password and enjoy! > **As always**: Make sure to change the default password (which is **root**) and choose a more secure one at first setup and consider more security if your dashboard is accessible on the network. ## License diff --git a/defaults.php b/defaults.php index 230bdf6..ff5570e 100644 --- a/defaults.php +++ b/defaults.php @@ -10,6 +10,7 @@ 'general' => array ( 'pass' => '63a9f0ea7bb98050796b649e85481845', + 'loginWithPassword' => '1', 'initialsetup' => '0', 'tempunit' => '0' ), diff --git a/index.php b/index.php index bb28a49..7af93af 100755 --- a/index.php +++ b/index.php @@ -11,7 +11,15 @@ $config = new Config; $config->load("local.config", "defaults.php"); -$auth=(isset($_SESSION["rpidbauth"])) ? true : false; +$loginWithPassword = $config->get("general.loginWithPassword"); + +if($loginWithPassword) { + $auth = (isset($_SESSION["rpidbauth"])) ? true : false; +} +else { + $auth = true; + $_SESSION["rpidbauth"]=time(); +} if(!isset($_SESSION["setup"])){ if( ($config->get("general.initialsetup")=="0") || ($config->get("general.initialsetup")=="") ){ @@ -189,7 +197,11 @@
 System
  + +
@@ -586,6 +598,8 @@