paperless-ng icon indicating copy to clipboard operation
paperless-ng copied to clipboard

[BUG] Password reset after docker container restarted

Open alexthamm opened this issue 3 years ago • 1 comments
trafficstars

Describe the bug I deployed Paperless-NG in TrueNAS via the TrueCharts integration. TrueCharts uses the official docker container and passes environment variables to configure the superuser.

I changed the admin password in the Django admin interface. However, after redeploying the application (for example due to an update) the password gets overridden by the initial password passed via environment variable.

To Reproduce Steps to reproduce the behavior:

  1. Deploy Paperless with credentials admin//secret
  2. Open Paperless
  3. Navigate to admin interface
  4. Change password to "mysupersecretpassword"
  5. Restart/update the docker container
  6. Navigate to Paperless and try to login with admin/mysupersecretpassword
  7. You can't login.

Expected behavior The admin password should not be overridden by the initial password.

Relevant information

  • Version
  • Installation method: docker
  • Any configuration changes you made in docker-compose.yml, docker-compose.env or paperless.conf. -

I think this is related to the admin user password reset when the docker container is started: docker-entrypoint.sh calls docker-prepare.sh calls the manage_superuser mgmt command and there the password is updated: https://github.com/jonaswinkler/paperless-ng/blob/master/src/documents/management/commands/manage_superuser.py#L29

Am I missing something?

alexthamm avatar Dec 29 '21 00:12 alexthamm

I experience the same issue on v1.5.0

paulschwoerer avatar Feb 21 '22 20:02 paulschwoerer