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

Default admin password is not working #101

Open
inkerinmaa opened this issue Oct 16, 2024 · 4 comments
Open

Default admin password is not working #101

inkerinmaa opened this issue Oct 16, 2024 · 4 comments

Comments

@inkerinmaa
Copy link

I am using TAG=14-slim (used TAG=14 as well) and cannot login with admin - admin password.
I get error:
Invalid user or password or the account is blocked due to multiple failed login attempts. If so, it will be unblocked automatically in a short time.
I tried to reset password using this instruction:
https://www.openproject.org/docs/installation-and-operations/operation/faq/
But it also doesn't work, I get error:
irb(main):004> u.save!
(irb):4:in `

': Validation failed: Username has already been taken. (ActiveRecord::RecordInvalid)

I tried to add root user to docker containers a someone suggested - same result.

@Weltii
Copy link

Weltii commented Oct 23, 2024

I have the same problem. :/ Instead of the stable/14 branch, I use stable/13. It is not up to date, but works for testing.

@inkerinmaa
Copy link
Author

I have the same problem. :/ Instead of the stable/14 branch, I use stable/13. It is not up to date, but works for testing.

I found (think so) the root cause. In docker compose file they bind directories inside container to the directory on host, where user has no write permissions. I just created docker volumes instead and replaced assignment in docker compose file (also, it is possible to chown for that binded folder).

@yuki-shimoda-crypto
Copy link

I have the same problem. :/ Instead of the stable/14 branch, I use stable/13. It is not up to date, but works for testing.

I found (think so) the root cause. In docker compose file they bind directories inside container to the directory on host, where user has no write permissions. I just created docker volumes instead and replaced assignment in docker compose file (also, it is possible to chown for that binded folder).

I experienced the same issue, and following the above solution worked for me too. Here are the steps I took:

  1. Run cp .env.example .env.
  2. Leave PGDATA= and OPDATA= empty in the .env file. This automatically creates Docker volumes, and the setup works smoothly.

@cebberus
Copy link

this work for me,

To resolve the issue with administrator access in OpenProject when the default admin - admin login doesn’t work, follow these steps:

  1. Create a user account in the OpenProject web application:

    • Access OpenProject in your browser and create a new user account without administrator privileges. This account will serve as a base to grant administrative access.
  2. Access the database container in Docker:

    • Enter the PostgreSQL container that holds the OpenProject database:
      docker exec -it openproject-db-1 psql -U postgres -d openproject
  3. Verify the account's administrator status:

    • Run the following query to check if the account is set as an administrator:
      SELECT id, login, admin, status FROM users WHERE login = 'your_username';
    • Replace 'your_username' with the username you created in step 1.
  4. Promote the account to administrator (if necessary):

    • If the admin field is set to false (f), update it to true (t) to grant administrator privileges:
      UPDATE users SET admin = true WHERE login = 'your_username';
  5. Activate the account:

    • Ensure the status field is set to allow access (typically, status = 1 indicates an active account in OpenProject). If the status is different, activate it with this query:
      UPDATE users SET status = 1 WHERE login = 'your_username';
  6. Confirm and exit:

    • Confirm that the admin status is set to true and that status is 1. Then exit the psql session:
      \q

With these steps, the account should now have administrator permissions and be fully activated, allowing you to access OpenProject with administrative privileges. This method enables you to manually create an administrator account without relying on the default admin - admin credentials.

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

No branches or pull requests

4 participants