14
2023
07
09:49:36

JumpServer常见登陆问题解决



推荐点击下面图片,通过本站淘宝优惠价购买:

image.png

1.MFA错误无法登陆

解决方案:

确保MFA正确的情况下,在JumpServer服务器上,检查当前时间

# date

Thu Nov 24 10:47:13 CST 2022

同步时间

# yum install -y ntpdate ntp

## 同步阿里云时间

# ntpdate ntp1.aliyun.com

设置自动时间同步(内部有时间服务器则使用自己的时间服务器)

# vim /etc/ntp.conf

server ntp1.aliyun.com

restrict ntp1.aliyun.com nomodify notrap noquery

# crontab -e

* 12 * * * /usr/sbin/ntpdate -u ntp1.aliyun.com

* 23 * * * /usr/sbin/ntpdate -u ntp1.aliyun.com

2.忘记管理员密码

解决方案:通过邮件找回,或进入JumpServer终端,重置管理员密码

通过邮件:注意输入用户匹配的邮箱号,否则验证码会发送失败


通过JumpServer终端修改:

# docker exec -it jms_core /bin/bash

$ cd /opt/jumpserver/apps

$ python manage.py shell

### 注意,下列命令每条均需要回车,不能一次性执行

### username为需要修改的用户,password为修改后的密码

from users.models import User

u = User.objects.get(username='admin')

u.reset_password('password')

u.save()

3.MFA丢失无法登陆

解决方案:管理员手动重置,或进入JumpServer终端,重置管理员MFA

管理员手动重置:

重置MFA

JumpServer后端重置:

# docker exec -it jms_core /bin/bash

$ cd /opt/jumpserver/apps

$ python manage.py shell

### 注意,下列命令每条均需要回车,不能一次性执行

### username为需要重置MFA的用户名

from users.models import User

u = User.objects.get(username='admin')

u.mfa_level='0'

u.otp_secret_key=''

u.save()

4.登陆频繁账号被锁

解决方案:找管理员手动帮助解锁,或管理员在JumpServer终端解锁

页面重置:进入被锁用户相信信息

JumpServer后端重置

# docker exec -it jms_core /bin/bash

$ cd /opt/jumpserver/apps

$ python manage.py shell

### 注意,下列命令每条均需要回车,不能一次性执行

from django.core.cache import cache

cache.delete_pattern('_LOGIN_BLOCK_*')

cache.delete_pattern('_LOGIN_LIMIT_*')


本文链接:https://hqyman.cn/post/4305.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:





休息一下,本站随机推荐观看栏目:


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

您的IP地址是: