Files
certd/docs/guide/use/forgotpasswd/index.md
xiaojunnuo 66d8cafd76 chore: 1
2026-01-07 10:58:17 +08:00

39 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 忘记管理员密码
解决方法如下:
## 1. 修改环境变量
docker部署的
修改docker-compose.yaml文件将环境变量`certd_system_resetAdminPasswd`改为`true`
```yaml
services:
certd:
environment: # 环境变量
- certd_system_resetAdminPasswd=true
```
源码部署的,修改`packages/ui/certd-server/.env`文件
```ini
certd_system_resetAdminPasswd=true
```
## 2. 重启容器
```shell
docker compose up -d
docker logs -f --tail 500 certd
# 观察日志当日志中输出“重置1号管理员用户密码完成”即可操作下一步
# 这里会打印1号管理员记录的用户名如果你修改过管理员用户名请注意查看此条日志
```
## 3. 恢复环境变量
修改docker-compose.yaml`certd_system_resetAdminPasswd`改回`false`
## 4. 再次重启容器
```shell
docker compose up -d
```
## 5. 默认密码登录
使用`原管理员账号/123456`登录系统,请及时修改管理员密码
> 默认管理员账号: admin
> 如果忘记管理员账号,请查看修改密码时的启动日志,会打印管理员账号名