Spug“账户已被系统禁用”的解决办法
Posted 一掬净土
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Spug“账户已被系统禁用”的解决办法相关的知识,希望对你有一定的参考价值。
问题:未知原因导致“账户已被系统禁用”
处理方式:
进入spug容器内部,直接改数据库spug user表 的admin的is_active=1即可。
[root@nb1 bin]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bb001c1db674 registry.aliyuncs.com/openspug/spug "/entrypoint.sh" 4 weeks ago Up 37 minutes 0.0.0.0:8082->80/tcp, :::8082->80/tcp spug
1、进入容器内部:
docker exec -it spug bash
2、改数据库流程:
[root@bb001c1db674 /]# mysql -uspug -pspug.dev
Welcome to the MariaDB monitor. Commands end with ; or \\g.
Your MariaDB connection id is 47
Server version: 5.5.68-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.
MariaDB [(none)]>
MariaDB [(none)]>
MariaDB [(none)]>
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| spug |
| test |
+--------------------+
3 rows in set (0.00 sec)
MariaDB [(none)]> use spug
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [spug]>
MariaDB [spug]>
MariaDB [spug]> show tables;
+-------------------+
| Tables_in_spug |
+-------------------+
| alarm_contacts |
| alarm_groups |
| alarms |
| apps |
| config_histories |
| configs |
| deploy_extend1 |
| deploy_extend2 |
| deploy_requests |
| deploys |
| detections |
| django_migrations |
| environments |
| exec_templates |
| host_extend |
| host_groups |
| host_groups_hosts |
| hosts |
| login_histories |
| navigations |
| notices |
| notifies |
| repositories |
| roles |
| services |
| settings |
| task_histories |
| tasks |
| user_role_rel |
| users |
+-------------------+
30 rows in set (0.00 sec)
MariaDB [spug]> select * from users;
+----+----------+-----------+--------------------------------------------------------------------------------+---------+-----------+-----------+----------------------------------+---------------+---------------------+---------------+----------+---------------------+------------+---------------+---------------+
| id | username | nickname | password_hash | type | is_supper | is_active | access_token | token_expired | last_login | last_ip | wx_token | created_at | deleted_at | created_by_id | deleted_by_id |
+----+----------+-----------+--------------------------------------------------------------------------------+---------+-----------+-----------+----------------------------------+---------------+---------------------+---------------+----------+---------------------+------------+---------------+---------------+
| 1 | admin | 管理员 | pbkdf2_sha256$150000$6pMX0lbZ1gP0$FOkYC42nLZI8Qdl6zF0wqaFdfKsUH1iMwD69Db85160= | default | 1 | 0 | ff2a325e650644f5a02e95315008d38a | 1633974335 | 2021-10-11 13:14:05 | 192.168.1.127 | NULL | 2021-09-08 17:07:57 | NULL | NULL | NULL |
+----+----------+-----------+--------------------------------------------------------------------------------+---------+-----------+-----------+----------------------------------+---------------+---------------------+---------------+----------+---------------------+------------+---------------+---------------+
1 row in set (0.00 sec)
MariaDB [spug]> update users set is_active =1 ;
Query OK, 1 row affected (0.06 sec)
Rows matched: 1 Changed: 1 Warnings: 0
MariaDB [spug]> exit
这样就解决了这个问题,好!
注意:spug不只是docker部署一种方法,所以根据自己的来。思路是一样的。
此外,还可以接外部数据库,如果是外部的话,就直接在外部对应的数据库内进行改动即可。
END
以上是关于Spug“账户已被系统禁用”的解决办法的主要内容,如果未能解决你的问题,请参考以下文章
django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE的解决办法(转)(代码片段
svn报错cleanup failed–previous operation has not finished; run cleanup if it was interrupted的解决办法(代码片段
NDK: ant 错误 [javah] Exception in thread "main" java.lang.NullPointerException 多种解决办法(代码片段