Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BUG] after delete-settings lost admin user name cant be reused #2274

@tlindi

Description

@tlindi

Describe the bug
lnbits-cli tool resets settings so they are re-read from .env and first_start is shown.
If one wants to use same super admin username, it is impossible cause username is reserved.

To Reproduce
Steps to reproduce the behavior:

  1. Install lnbits and goto first_install. create superuser "lnbits" and password
  2. run poetry run -C /home/setup/lnbits lnbits-cli delete-settings
  3. restart LNbits
  4. goto first_install page and try to create user lnbits
  5. You will get error: Username already in exists. 403 FORBIDDEN
    If you have lost superuser UID / username&pwd there's no avail.
    Even if you create new superadmin, it cant see old super admin with usermanager. And it can not see users the old superuser created.

Expected behavior
"delete settings" should set superuser name and password so it is possible to first_install to reset username (not "usr") and password.

Screenshots
If needed.

Desktop (please complete the following information):

  • LNbits version: 0.12.1
  • Database: sqlite (this template is missings ":" after "Database")

Additional context
(User management is tuff issue to handle.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions