Reset user and/or admin password

Is there a way to reset a user or admin password from shell for Seatable CE? And how can I figure out the name of the admin account? And where can I find the credentials for the mysql admin?

You find all users including the admin users in the table dtable_db.EmailUser.
The mysql admin’s credentials are in the docker-compose.yml, unless you have manually changed them after initialization of SeaTable.

1 Like

The mysql admin’s credentials are in the docker-compose.yml

Yes - NOW I remember. :wink: So easy :crazy_face:

I cannot find the table dtable_db.EmailUser but I found the table auth_user with credential fields:

MariaDB [(none)]> DESC dtable_db.auth_user;
+--------------+--------------+------+-----+---------+----------------+
| Field        | Type         | Null | Key | Default | Extra          |
+--------------+--------------+------+-----+---------+----------------+
| id           | int(11)      | NO   | PRI | NULL    | auto_increment |
| password     | varchar(128) | NO   |     | NULL    |                |
| last_login   | datetime(6)  | YES  |     | NULL    |                |
| is_superuser | tinyint(1)   | NO   |     | NULL    |                |
| username     | varchar(150) | NO   | UNI | NULL    |                |
| first_name   | varchar(30)  | NO   |     | NULL    |                |
| last_name    | varchar(30)  | NO   |     | NULL    |                |
| email        | varchar(254) | NO   |     | NULL    |                |
| is_staff     | tinyint(1)   | NO   |     | NULL    |                |
| is_active    | tinyint(1)   | NO   |     | NULL    |                |
| date_joined  | datetime(6)  | NO   |     | NULL    |                |
+--------------+--------------+------+-----+---------+----------------+
11 rows in set (0.002 sec)

But when I query the table I get an empty record set:

MariaDB [(none)]> SELECT * FROM dtable_db.auth_user;
Empty set (0.001 sec)

I setup about 10 users. The table should not be empty. Additionally I checked if the user were accidentially deleted but the modification time of the underlaying files looks good for me:

root@seatable:/opt/seatable# ll mysql-data/dtable_db/auth_user.*
-rw-rw---- 1 999 docker 3,5K Jun 22  2022 mysql-data/dtable_db/auth_user.frm
-rw-rw---- 1 999 docker 112K Jun 22  2022 mysql-data/dtable_db/auth_user.ibd

Any ideas?

Sorry, the correct table is ccnet_db.EmailUser!

Perfect - found it.

But meanwhile I found our problem is bigger than expected. No user can login anymore. Before I break the system completely: Is it possible to set the (initial) superuser again?

# Create admin account.
docker exec -it seatable /shared/seatable/scripts/seatable.sh superuser

You can rerun the superuser command as often as you want. Everytime you run it, a new user is created, provided you use a new email address.

But, there is one important caveat for SeaTable Enterprise: The user accounts created with the superuser command count against your license. If you create more users than your license permits, SeaTable won’t start anymore. Then you’ll have set the users to inactive in the database.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.