[GH-ISSUE #1397] Users added with createsuperuser have "isolated" identity list #1108

Closed
opened 2026-02-27 11:15:20 +03:00 by kerem · 3 comments
Owner

Originally created by @jakicoll on GitHub (Feb 15, 2018).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1397

Impacted versions

  • Modoboa: 1.9.0
  • installer used: Yes
  • Webserver: Apache

Steps to reproduce

Enter the virtual enviroment and

./instance/manage.py createsuperuser
Username: some-createdsu
Email: 
Password: 
Password (again): 
Superuser created successfully.

Current behavior

As I login with this user, dashboard shows 1 domain and 12 identities (which is correct).
However, when I go to "List identities", only the user modboa is shown (which was created by createsuperuser or the installer - I don't exactly remember that).

By creating another superuser now via the webinterface "Add identity" and logging in with that new user, I can see all identities, except the two created with the createsuperuser-function.

This is an excerpt of my sql table core_user. Note the "is_staff" and "master_user" property. I could not find any other obvious differences in the database. I did not look very intensitive though.

+----+--------------+-------------------------------+----------+-----------+-------------+
| id | is_superuser | username                      | is_staff | is_active | master_user |
+----+--------------+-------------------------------+----------+-----------+-------------+
|  1 |            1 | superadmin@mydomain.de        |        0 |         1 |           1 |
|  6 |            1 | super2                        |        0 |         1 |           1 |
|  9 |            1 | modoboa                       |        1 |         1 |           0 |
| 11 |            1 | some-createdsu                |        1 |         1 |           0 |
+----+--------------+-------------------------------+----------+-----------+-------------+

Changing is_staff and master_user does not seem to fix this behaviour, though.

Originally created by @jakicoll on GitHub (Feb 15, 2018). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1397 # Impacted versions * Modoboa: 1.9.0 * installer used: Yes * Webserver: Apache # Steps to reproduce Enter the virtual enviroment and ``` ./instance/manage.py createsuperuser Username: some-createdsu Email: Password: Password (again): Superuser created successfully. ``` # Current behavior As I login with this user, dashboard shows 1 domain and 12 identities (which is correct). However, when I go to "List identities", only the user modboa is shown (which was created by `createsuperuser` or the installer - I don't exactly remember that). By creating another superuser now via the webinterface "Add identity" and logging in with that new user, I can see all identities, except the two created with the `createsuperuser`-function. This is an excerpt of my sql table core_user. Note the "is_staff" and "master_user" property. I could not find any other obvious differences in the database. I did not look very intensitive though. ``` +----+--------------+-------------------------------+----------+-----------+-------------+ | id | is_superuser | username | is_staff | is_active | master_user | +----+--------------+-------------------------------+----------+-----------+-------------+ | 1 | 1 | superadmin@mydomain.de | 0 | 1 | 1 | | 6 | 1 | super2 | 0 | 1 | 1 | | 9 | 1 | modoboa | 1 | 1 | 0 | | 11 | 1 | some-createdsu | 1 | 1 | 0 | +----+--------------+-------------------------------+----------+-----------+-------------+ ``` Changing is_staff and master_user does not seem to fix this behaviour, though.
kerem closed this issue 2026-02-27 11:15:20 +03:00
Author
Owner

@tonioo commented on GitHub (Feb 21, 2018):

You should not create a user like this because it won't update internal permissions. Can you try to run the following command:

> python manage.py modo repair
<!-- gh-comment-id:367320451 --> @tonioo commented on GitHub (Feb 21, 2018): You should not create a user like this because it won't update internal permissions. Can you try to run the following command: ```shell > python manage.py modo repair ```
Author
Owner

@jakicoll commented on GitHub (Feb 22, 2018):

Yep, fixed that. Sorry for poking around too much.
Would you accept a PR that adds a warning to the output of manage.py createsuperuser?

<!-- gh-comment-id:367666471 --> @jakicoll commented on GitHub (Feb 22, 2018): Yep, fixed that. Sorry for poking around too much. Would you accept a PR that adds a warning to the output of manage.py createsuperuser?
Author
Owner

@tonioo commented on GitHub (Feb 22, 2018):

Sure.

<!-- gh-comment-id:367731398 --> @tonioo commented on GitHub (Feb 22, 2018): Sure.
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/modoboa-modoboa#1108
No description provided.