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.xmltruetruetruefalse
2.然后再重启一下jenkins:
[root@VM-0-15-centos jenkins]# ps -ef |grep jenkinsroot 2962002 2918204 77 15:57 pts/200:01:13 /data/jenkins/jdk-11.0.15.1/bin/java -jar jenkins.war --httpPort=8800root 2965716 29182040 15:59 pts/200: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.找到管理用户重新设置密码