myDrive icon indicating copy to clipboard operation
myDrive copied to clipboard

Everytime I restart mydrive script, Password doesn't work

Open calebdatechguy opened this issue 4 years ago • 6 comments

Hey! So whenever i restart my server, or the myDrive script, it always has trouble with user passwords. Every time i restart, it seems to just "forget the password". I don't change anything in mongo, or anything on the file system either... so i have no clue why this could be happening... https://gyazo.com/c549562ff5f52e85acba0b88d240da8f There is a screenshot of the password incorrect page.

Is there any command for me to reset my password? I do not mind doing this, but I just hate to loose access to my files every time the script restarts...

Hope this can be figured out because I love this! Thanks, Caleb

calebdatechguy avatar Mar 21 '21 02:03 calebdatechguy

What an odd issue... I’ve never heard of this one before haha. Whenever the server starts does it ask you to enter an encryption key first? The only thing I can guess is the encryption key is different so it throws an error trying to decrypt the password.

subnub avatar Mar 21 '21 09:03 subnub

yeah i know right... It does ask for the encryption key...

On Sun, Mar 21, 2021 at 5:55 AM subnub @.***> wrote:

What an odd issue... I’ve never heard of this one before haha. Whenever the server starts does it ask you to enter an encryption key first? The only thing I can guess is the encryption key is different so it throws an error trying to decrypt the password.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/subnub/myDrive/issues/43#issuecomment-803545208, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHQXUBHMZFEOIULDGP6DKB3TEW67TANCNFSM4ZRBHWIQ .

calebdatechguy avatar Mar 21 '21 13:03 calebdatechguy

I just tried to enter the password, got incorrect password, and i realized it returned this to the console: [image: Screen Shot 2021-03-21 at 9.35.31 AM.png]

On Sun, Mar 21, 2021 at 9:27 AM Caleb Elliott @.***> wrote:

yeah i know right... It does ask for the encryption key...

On Sun, Mar 21, 2021 at 5:55 AM subnub @.***> wrote:

What an odd issue... I’ve never heard of this one before haha. Whenever the server starts does it ask you to enter an encryption key first? The only thing I can guess is the encryption key is different so it throws an error trying to decrypt the password.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/subnub/myDrive/issues/43#issuecomment-803545208, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHQXUBHMZFEOIULDGP6DKB3TEW67TANCNFSM4ZRBHWIQ .

calebdatechguy avatar Mar 21 '21 13:03 calebdatechguy

For some reason I cannot see the image, can you try to upload it again please?

Edit: Most likely because you tried to upload the image through a reply in your email

subnub avatar Mar 21 '21 14:03 subnub

sure, i put it on a link this time: https://ibb.co/Mhrtsxx

On Sun, Mar 21, 2021 at 10:37 AM subnub @.***> wrote:

For some reason I cannot see the image, can you try to upload it again please?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/subnub/myDrive/issues/43#issuecomment-803593482, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHQXUBD5HLOKS4Z7XEQEYPLTEYAB3ANCNFSM4ZRBHWIQ .

calebdatechguy avatar Mar 21 '21 14:03 calebdatechguy

Okay yeah this def looks like it is caused by the encryption key. I think most likely you accidently typed in the wrong password when you first created/ran the server. Now whenever you restart the server you're putting in a different key. I probably should add some type of fail safe for this in the future.

Unfortunately you cannot recover a lost/forgotten key, unless of course you can somehow figure out what you typed in when you first created the server.

If you cannot figure it out, you will have to clear out the database and start over I'm afraid. When you run the setup again, I recommend choosing the option to enter the encryption key once instead of every time the server starts if it's causing you to much trouble. While this is less secure (anyone can check in your env file and see your key) it should be okay if you're just using it for personal use.

Let me know if you are having trouble figuring out how to reset your database, if you aren't too familiar with commands you could also manually delete them using a program like Robo3T or Compass.

subnub avatar Mar 21 '21 19:03 subnub