如果忘记admin的登录密码,可按如下方法处理 # 编辑config.xml文件,替换passwordHash行的内容# vim /var/lib/jenkins/users/admin_1679382529066310837/config.xml <passwordHash>#jbcrypt:$2a$$MiIVR0rr/UhQBqT.bBq0QehTiQVqgNpUGyWW2nJObaVAM/2xSQdSq</passwordHash> # 修改后重启jenkins system
python manage.py shell 然后获取你的用户名,并且重设密码:from django.contrib.auth.models import User user = User.objects.get(username='admin')user.set_password('new_password')user.save()
复方法: 1. 运行此sql 找到你的管理员帐户: select u.id, u.user_name, u.active from cwd_user u join cwd_membership m on u.id=m.child_user_id join cwd_group g on m.parent_id=g.id join cwd_directory d on d.id=g.directory_id where g.group_name = 'confluence-administrator