File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,37 @@ This may also be found at: /root/.jenkins/secrets/initialAdminPassword
158
158
- 如果配置插件过程遇到这个错误:`No valid crumb was included in the request`,则多重试几次。
159
159
- 登录后把:<http://192.168.0.105:18080/configureSecurity/> 下面的 `防止跨站点请求伪造` 勾选去掉。遇到问题多试几次。
160
160
161
+
162
+ ## 忘记 admin 密码进行重置
163
+
164
+ - 备份配置文件:` cp /root/.jenkins/config.xml /root/.jenkins/config.xml.back `
165
+ - 编辑:` vim /root/.jenkins/config.xml ` ,删除 config.xml 文件中的这部分内容,在 10 行左右位置
166
+
167
+ ```
168
+ <useSecurity>true</useSecurity>
169
+ <authorizationStrategy class="hudson.security.FullControlOnceLoggedInAuthorizationStrategy">
170
+ <denyAnonymousReadAccess>true</denyAnonymousReadAccess>
171
+ </authorizationStrategy>
172
+ <securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
173
+ <disableSignup>true</disableSignup>
174
+ <enableCaptcha>false</enableCaptcha>
175
+ </securityRealm>
176
+ ```
177
+
178
+ - 重启服务,进入首页此时系统是免密状态
179
+ - 选择左侧的 ` 系统管理 ` ,系统会提示你需要配置安全设置:` 全局安全配置 `
180
+ - 勾选 ` 启用安全 `
181
+ - 安全域 > 勾选 ` Jenkins专有用户数据库 `
182
+ - 点击保存
183
+ - 重新点击首页:` 系统管理 `
184
+ - 点击 ` 管理用户 `
185
+ - 在用户列表中点击 admin 右侧齿轮
186
+ - 修改密码,修改后即可重新登录。
187
+ - 选择左侧的 ` 系统管理 ` ,系统会提示你需要配置安全设置:` 全局安全配置 `
188
+ - 勾选 ` 启用安全 `
189
+ - 授权策略 > 勾选 ` 登录用户可以做任何事 ` 或 ` 安全矩阵 `
190
+ - 点击保存
191
+
161
192
-------------------------------------------------------------------
162
193
163
194
## pipeline 语法
@@ -927,3 +958,4 @@ pipeline {
927
958
- < http://stackoverflow.com/questions/4969156/java-net-unknownhostexception >
928
959
- < https://www.jianshu.com/p/b50e679e2409 >
929
960
- < http://xkcoding.com/2018/01/04/devops-jenkins.html >
961
+ - < https://blog.csdn.net/jlminghui/article/details/54952148 >
You can’t perform that action at this time.
0 commit comments