[GH-ISSUE #439] Cannot delete 'admin' account #342

Open
opened 2026-02-25 21:31:44 +03:00 by kerem · 3 comments
Owner

Originally created by @RefineryX on GitHub (Dec 18, 2021).
Original GitHub issue: https://github.com/ciur/papermerge/issues/439

Originally assigned to: @ciur on GitHub.

Description
I created a new account assigning 'Superuser status' and 'active'. I want this to replace the default 'admin' account however cannot delete the admin account. I have tried both removing and renaming but the account returns on restart.

Expected
When deleting the 'admin' account, it should be permanently deleted and not be restored on docker restart.

Info:

  • OS: Debian Bullseye
  • Browser Safari
  • Database MariadB
  • Papermerge Version Papermerge 2.0
Originally created by @RefineryX on GitHub (Dec 18, 2021). Original GitHub issue: https://github.com/ciur/papermerge/issues/439 Originally assigned to: @ciur on GitHub. **Description** I created a new account assigning 'Superuser status' and 'active'. I want this to replace the default 'admin' account however cannot delete the admin account. I have tried both removing and renaming but the account returns on restart. **Expected** When deleting the 'admin' account, it should be permanently deleted and not be restored on docker restart. **Info:** - OS: Debian Bullseye - Browser Safari - Database MariadB - Papermerge Version Papermerge 2.0
Author
Owner

@ciur commented on GitHub (Dec 19, 2021):

This is docker image specific issue.
On docker image initialization this script runs from here and creates admin user (in case admin does not exist).

Probably it is a better idea to skip entirely automatic admin user creation and provide user UI to create admin user if not present.

<!-- gh-comment-id:997349086 --> @ciur commented on GitHub (Dec 19, 2021): This is docker image specific issue. On docker image initialization [this script](https://github.com/ciur/papermerge/blob/master/docker/scripts/create_user.py) runs from [here](https://github.com/ciur/papermerge/blob/master/docker/app.startup.sh#L16) and creates admin user (in case admin does not exist). Probably it is a better idea to skip entirely automatic admin user creation and provide user UI to create admin user if not present.
Author
Owner

@RefineryX commented on GitHub (Dec 19, 2021):

Probably it is a better idea to skip entirely automatic admin user creation and provide user UI to create admin user if not present.

I think that is a great idea. For security, want to complete remove any connection with the default username and password, esp when they have already pre-set values (admin/admin). No matter what I do, it but it keeps coming back so I am forced to use the 'admin' username but changed the password.

It would also be great to maybe allow the user to setup a username/pass as part of onboarding when starting a fresh install.

<!-- gh-comment-id:997371658 --> @RefineryX commented on GitHub (Dec 19, 2021): > Probably it is a better idea to skip entirely automatic admin user creation and provide user UI to create admin user if not present. I think that is a great idea. For security, want to complete remove any connection with the default username and password, esp when they have already pre-set values (admin/admin). No matter what I do, it but it keeps coming back so I am forced to use the 'admin' username but changed the password. It would also be great to maybe allow the user to setup a username/pass as part of onboarding when starting a fresh install.
Author
Owner

@Northguy commented on GitHub (Feb 6, 2022):

You could just login as admin, create a new account, assign that new account superuser rights, login with the new account name, revoke superuser access from 'admin' and disable the 'admin' account? Sounds safe enoughwith the exception of the fact that you will keep seeing the disabled admin account in the user overview.

<!-- gh-comment-id:1030820709 --> @Northguy commented on GitHub (Feb 6, 2022): You could just login as admin, create a new account, assign that new account superuser rights, login with the new account name, revoke superuser access from 'admin' and disable the 'admin' account? Sounds safe enoughwith the exception of the fact that you will keep seeing the disabled admin account in the user overview.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#342
No description provided.