jenkins忘记admin密码

jenkins忘记admin密码,重置密码:

1.找打jenkins目录下面的config.xml

复制代码
[root@VM-0-15-centos .jenkins]# find ./* -name config.xml
./config.xml
[root@VM-0-15-centos .jenkins]# pwd 
/root/.jenkins

删除下面的这部分内容:
[root@VM-0-15-centos .jenkins]# vim config.xml
  
  <useSecurity>true</useSecurity>
  <authorizationStrategy class="hudson.security.FullControlOnceLoggedInAuthorizationStrategy">
    <denyAnonymousReadAccess>true</denyAnonymousReadAccess>
  </authorizationStrategy>
  <securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
    <disableSignup>true</disableSignup>
    <enableCaptcha>false</enableCaptcha>
  </securityRealm>

2.然后再重启一下jenkins:

复制代码
[root@VM-0-15-centos jenkins]# ps -ef |grep jenkins
root     2962002 2918204 77 15:57 pts/2    00:01:13 /data/jenkins/jdk-11.0.15.1/bin/java -jar jenkins.war --httpPort=8800
root     2965716 2918204  0 15:59 pts/2    00:00:00 grep --color=auto jenkins
[root@VM-0-15-centos jenkins]# kill -9 2962002
[root@VM-0-15-centos jenkins]# nohup /data/jenkins/jdk-11.0.15.1/bin/java -jar jenkins.war --httpPort=8800 > nohup.out &
[1] 2962558
[root@VM-0-15-centos jenkins]# nohup: ignoring input and redirecting stderr to stdout

3.然后再访问页面:http://ip:8800

或者 点击系统管理找到全局安全配置(Configure Global Security)

4.找到管理用户重新设置密码

相关推荐
二哈赛车手4 小时前
新人笔记---ApiFox的一些常见使用出错
java·笔记·spring
栗子~~5 小时前
JAVA - 二层缓存设计(本地缓冲+redis缓冲+广播所有本地缓冲失效) demo
java·redis·缓存
abigriver5 小时前
打造 Linux 离线大模型级语音输入法:Whisper.cpp + 3090 显卡加速与 Rime 中英混输终极调优指南
linux·运维·whisper
YDS8295 小时前
DeepSeek RAG&MCP + Agent智能体项目 —— RAG知识库的搭建和接口实现
java·ai·springboot·agent·rag·deepseek
charlie1145141916 小时前
嵌入式Linux驱动开发pinctrl篇(1)——从寄存器到子系统:驱动演进之路
linux·运维·驱动开发
Agent手记6 小时前
异常考勤智能预警与处理与流程优化方案 | 基于企业级Agent的超自动化实战教程
运维·人工智能·ai·自动化
未若君雅裁6 小时前
MyBatis 一级缓存、二级缓存与清理机制
java·缓存·mybatis
cen__y7 小时前
Linux12(Git01)
linux·运维·服务器·c语言·开发语言·git
AI人工智能+电脑小能手7 小时前
【大白话说Java面试题 第65题】【JVM篇】第25题:谈谈对 OOM 的认识
java·开发语言·jvm
阿维的博客日记7 小时前
Nacos 为什么能让配置动态生效?(涉及 @RefreshScope 注解)
java·spring