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

Cannot change password of initial user #970

Open
alzeebum opened this issue Dec 14, 2024 · 6 comments
Open

Cannot change password of initial user #970

alzeebum opened this issue Dec 14, 2024 · 6 comments

Comments

@alzeebum
Copy link

Is this a feature for the backend or frontend?

Frontend

What would you like?

You should be able to change the initial administrative user's password, but you cannot. After installing with the Automated Installation and successfully logging in, the first thing I intended to do was change this password, as the one I entered into the console was intentionally simple. However the "Users" list is empty, and there is no way to change the password in the "profile" section.

It appears the only supported way to change this password is through some backend console magic I am trying to figure out.

Why is this needed?

Changing passwords regularly is basic security policy.

Other information

No response

@meltyshev
Copy link
Member

Hi! Thanks for reporting this.

I’m not entirely sure how the automatic installer handles this, but the password cannot be changed because the initial user is defined in the environment variables (in the docker-compose.yml file).

To fix this, you need to remove the DEFAULT_ADMIN_* lines from /opt/planka/docker-compose.yml and restart the container. Once done, the default admin user should be fully editable.

@alzeebum
Copy link
Author

alzeebum commented Dec 14, 2024

Hi! Thanks for reporting this.

I’m not entirely sure how the automatic installer handles this, but the password cannot be changed because the initial user is defined in the environment variables (in the docker-compose.yml file).

To fix this, you need to remove the DEFAULT_ADMIN_* lines from /opt/planka/docker-compose.yml and restart the container. Once done, the default admin user should be fully editable.

Hey Maksim,

There are no config entries with such names, or anything beginning with DEFAULT_, in the /opt/planka/docker-compose.yml on the host. During the automated install you are prompted for the user details by what appears to be a shell script, I don't know where they go from there.

EDIT: Nevermind, there's an .env there with them inside.

@alzeebum
Copy link
Author

However, deleting those entries from the .env file and restarting with docker-compose restart does not make the user editable and in fact it reverted my password back to the initial one after I'd changed it via the instructions in the issue 327. I am continuing to investigate.

@meltyshev
Copy link
Member

There are no config entries with such names, or anything beginning with DEFAULT_, in the /opt/planka/docker-compose.yml on the host. During the automated install you are prompted for the user details by what appears to be a shell script, I don't know where they go from there.

EDIT: Nevermind, there's an .env there with them inside.

Oops, you're right!

However, deleting those entries from the .env file and restarting with docker-compose restart does not make the user editable and in fact it reverted my password back to the initial one after I'd changed it via the instructions in the issue 327. I am continuing to investigate.

Hmm, it seems these variables are either defined somewhere else or redefined after the restart. I'll check now to see how it works.

@alzeebum
Copy link
Author

I may have misspoke earlier. The default admin user still does not appear in the users list when clicking the little people icon, but I can change the password and username now. The first point is weird but not terribly important I suppose.

@meltyshev
Copy link
Member

Ah, that's expected. This user is the current user and can only be changed through the own settings with confirmation of the current password. However, it might be less confusing if it was displayed there but restricted from being deleted 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants