Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password Reset #590

Closed
frizby66 opened this issue Jun 17, 2022 · 10 comments
Closed

Password Reset #590

frizby66 opened this issue Jun 17, 2022 · 10 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@frizby66
Copy link

Have searched and cant find out how to reset the password? Any pointers?

@tealtwo
Copy link

tealtwo commented Jun 17, 2022

I'm Pretty Sure there's a file for it that you have to edit.

@frizby66
Copy link
Author

I could see anything obvious! Any pointers from anyone?

@tealtwo
Copy link

tealtwo commented Jun 20, 2022

Dry Saving the config and re-installing the plugin.

@seydx seydx added the enhancement New feature or request label Jun 22, 2022
@frizby66
Copy link
Author

Tried uninstall and reinstall...didnt work, still cant get into the interface :-(

@FinocchiaroGR
Copy link

I used the suggested password my MacBook gave me to create the new user, and when logging in for the first time with my finger print, it told me the password was wrong..... so much security but no way to reset my password? no even if I'm inside the local network of my home? there is no documentation about it anywhere on internet. :'(

@Finch106
Copy link

WARNING Interface: Failed login attempt! If you have forgotten your password you can reset to the default of
master/master by removing the user in the "database. json" file (/var/lib/homebridge/camera.ui/database/database.json and then restarting camera.ui

@frizby66
Copy link
Author

Tried that...doesnt appear to work. Still the same..found the user in the json and deleted the user. Also tried deleting the user folder.

@HelmerBarcos
Copy link

HelmerBarcos commented Sep 29, 2022

The problem is that the file /var/lib/homebridge/camera.ui/database/database.json is been modified to the default values if homebridge and Homebridge Camera Ui are running. To solve this you need to:

  1. Deactivate Homebridge Camera Ui under http://homebridge.local/plugins
  2. Run sudo hb-service stop inside the ubuntu server
  3. Edit the file by adding following object to under users : [ ... ] (edit the value of the id if other users were stored)
{
      "id": 2,
      "username": "master",
      "password": "JzUVQgmHtgXXT1syjbokEQ==$t4U9BUwDoeXNtxpgzi4DXwFIU2AXgq9QyoFQkImEyfPmx/mxg/a1snxyOhK8dvgtytjO1KkZ2sCbjzmgW8jPQQ==",
      "sessionTimer": 14400,
      "photo": "no_img.png",
      "permissionLevel": [
        "admin"
      ]
}

  1. Save the file
  2. Run sudo hb-service start inside the ubuntu server
  3. Activate Homebridge Camera Ui under http://homebridge.local/plugins
  4. Try to login with default credentials. username = master and password = master

PD: If you want another password just create your own encrypted password. You could use following code in https://codesandbox.io/

var crypto = require("crypto");

let salt = crypto.randomBytes(16).toString('base64');
let hash = crypto.createHmac('sha512', salt)
  .update("my-strong-password").digest('base64');

const password = salt + '$' + hash;

export default function App() {
  return (
    <div style={{width: "200px"}}>
      <h1>password</h1>
      <p>{password}</p>
    </div>
  );
}


@stale
Copy link

stale bot commented Dec 3, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Dec 3, 2022
@stale stale bot closed this as completed Dec 20, 2022
@Longkho
Copy link

Longkho commented Mar 1, 2023

For macOS user look for the ~/.homebridge/camera.ui/database which should have database.json and "user" dir.
Then locate the "users" under the database.json

"users": [
{
"id": 1,
"username": "master",
"password": "JzUVQgmHtgXXT1syjbokEQ==$t4U9BUwDoeXNtxpgzi4DXwFIU2AXgq9QyoFQkImEyfPmx/mxg/a1snxyOhK8dvgtytjO1KkZ2sCbjzmgW8jPQQ==",
"sessionTimer": 14400,
"photo": "no_img.png",
"permissionLevel": [
"admin"
]
}
],

use the password as "master" to login but do remember to change the username/password as camera.ui will not ask you to change the password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

7 participants