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.找到管理用户重新设置密码

相关推荐
乐观勇敢坚强的老彭1 分钟前
C++ STL 常用容器的速查表
java·c++·算法
wwwzhouzy5 分钟前
SpringBoot 响应式编程
java·spring boot·后端·响应式编程
不会就选b9 分钟前
Linux之线程(二)
linux·运维·服务器
Bonnie_121518 分钟前
10-深入理解ConcurrentHashMap(JDK1.8)
java·开发语言
莫得感情 o20 分钟前
设计模式 22 · 三个冷门模式:中介者、访问者、解释器
java·设计模式
HiDev_28 分钟前
【非标自动化】上位机快速上手(创建winform并运行起来)
运维·自动化
乐维_lwops29 分钟前
乐维社区“专家坐诊”第405期问答
运维·cmdb·运维监控·答疑·运维智能体·乐维运维智能体
esabby32 分钟前
韩国站群服务器租用平台推荐与外贸建站优势深度解析
运维·服务器
Aision_33 分钟前
实习手记 Day:从 ELK 到 Agent 的“最后一公里”——告警消费与上下文富化
运维·人工智能·web安全·elk·网络安全·安全威胁分析
evans在进步35 分钟前
LeetCode 74:搜索二维矩阵——Java 虚拟一维数组与二分查找详解
java·leetcode·矩阵