Forgotten my login details #246

Closed
opened 2026-02-04 18:04:54 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @jimbob111 on GitHub (Nov 13, 2022).

Hello,

I'm trying to login and have forgotten/changed my login details so cannot login unless I reinstall.

Running Planka in docker and have access to my compose file but don't know how to access the db to find my password.

Is there a way to do this??

Thanks.

Originally created by @jimbob111 on GitHub (Nov 13, 2022). Hello, I'm trying to login and have forgotten/changed my login details so cannot login unless I reinstall. Running Planka in docker and have access to my compose file but don't know how to access the db to find my password. Is there a way to do this?? Thanks.
Author
Owner

@meltyshev commented on GitHub (Nov 15, 2022):

Hello!

It's a little complicated, but unfortunately it's the only way so far.

First connect to the Planka container (planka-planka-1 is its name):

docker exec -ti planka-planka-1 /bin/bash

Then enter the console:

npx sails console --port 1338

Then update your password:

(async () => { const user = await sails.helpers.users.getOne({ email: 'YOUR_EMAIL_ADDRESS_HERE'}); await sails.helpers.users.updateOne(user, { password: 'YOUR_NEW_PASSWORD_HERE' }, user); })();

Then exit everywhere:

.exit
exit
@meltyshev commented on GitHub (Nov 15, 2022): Hello! It's a little complicated, but unfortunately it's the only way so far. First connect to the Planka container (`planka-planka-1` is its name): ``` docker exec -ti planka-planka-1 /bin/bash ``` Then enter the console: ``` npx sails console --port 1338 ``` Then update your password: ``` (async () => { const user = await sails.helpers.users.getOne({ email: 'YOUR_EMAIL_ADDRESS_HERE'}); await sails.helpers.users.updateOne(user, { password: 'YOUR_NEW_PASSWORD_HERE' }, user); })(); ``` Then exit everywhere: ``` .exit exit ```
Author
Owner

@jimbob111 commented on GitHub (Nov 15, 2022):

Hi meltyshev,

Thanks for getting back - did as above (copy &paste) - have only changed email and username below
(async () => { const user = await sails.helpers.users.getOne({ email: 'my@addyhere.com'}); await sails.helpers.users.updateOne(user, { password: 'myplankapasswd' }, user); })();

I get following errors showing in the sails cli

Please adjust your usage and try again.
 [?] See https://sailsjs.com/support for help.
    at REPL3:1:120
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  cause: Error [UsageError]: Could not run updateOne() because of 2 problems:
  ------------------------------------------------------
  • "record" is required, but it was not defined.
  • "user" is required, but it was not defined.
  ------------------------------------------------------
@jimbob111 commented on GitHub (Nov 15, 2022): Hi meltyshev, Thanks for getting back - did as above (copy &paste) - have only changed email and username below `(async () => { const user = await sails.helpers.users.getOne({ email: 'my@addyhere.com'}); await sails.helpers.users.updateOne(user, { password: 'myplankapasswd' }, user); })();` I get following errors showing in the sails cli ``` Please adjust your usage and try again. [?] See https://sailsjs.com/support for help. at REPL3:1:120 at processTicksAndRejections (node:internal/process/task_queues:96:5) { cause: Error [UsageError]: Could not run updateOne() because of 2 problems: ------------------------------------------------------ • "record" is required, but it was not defined. • "user" is required, but it was not defined. ------------------------------------------------------ ```
Author
Owner

@meltyshev commented on GitHub (Nov 15, 2022):

Hm, it looks like a user with the specified email was not found 🤔

You can try to display all users to see if there is a user with the specified email among them:

(async () => { const users = await sails.helpers.users.getMany(); console.log(users); })();
@meltyshev commented on GitHub (Nov 15, 2022): Hm, it looks like a user with the specified email was not found 🤔 You can try to display all users to see if there is a user with the specified email among them: ``` (async () => { const users = await sails.helpers.users.getMany(); console.log(users); })(); ```
Author
Owner

@jimbob111 commented on GitHub (Nov 15, 2022):

Thanks - the code above did help, been able to login , now but its all like a first install (default - demo) so have to input everything back in again.

My fault though - I did update planka a few nights prior and it looks like it/ I wiped my old settings doing that. Lesson learned.

Thanks for your help though and a great kanban board - I love it!!! Much appreciated.

@jimbob111 commented on GitHub (Nov 15, 2022): Thanks - the code above did help, been able to login , now but its all like a first install (default - demo) so have to input everything back in again. My fault though - I did update planka a few nights prior and it looks like it/ I wiped my old settings doing that. Lesson learned. Thanks for your help though and a great kanban board - I love it!!! Much appreciated.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#246