jumpserver忘记密码 --- 解决办法

#忘记 jumpserver 用户密码
jumpserver没有使用docker安装,而是直接安装的

调用jumpserver安装路径下的manage.py命令,如下:
[root@tool ~]# python /mnt/work/jumpserver/jumpserver-0.3.2/manage.py changepassword ryder 
Password: 
Password (again): 
Password changed successfully for user 'ryder'
[root@tool ~]# 

如果使用docker安装的jumpserver,使用如下方法:

[root@ope-jumpserver ~]# docker exec -it jms_all /bin/bash
#如果没有按装django 需执行下面命令进行安装(如安装过 此步骤可忽略)
#python3 -m pip install --upgrade pip setuptools
#python3 -m pip install django

#进入py3虚拟环境
[root@29f71e153a73 opt]# source /opt/py3/bin/activate

(py3) [root@29f71e153a73 ~]# python /opt/jumpserver/apps/manage.py changepassword admin
Password: 
Password (again): 
Password changed successfully for user 'Administrator(admin)'
(py3) [root@29f71e153a73 ~]# 
exit 退出jms_all 容器,去测试新密码即可

https://www.cnblogs.com/lewisx/p/16191033.html
posted @ 2023-02-08 16:39  RyderWang  阅读(303)  评论(0编辑  收藏  举报