暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

weblogic 集群正确修改密码方法和注意事项

原创 张洋华 2020-07-02
3286

概述:

前几天由于客户这边查出来一个weblogic控制台弱密码,我就直接在控制台网页里面改了密码;结果没想到过两天程序发布踩了一个坑(hhh折腾了一点时间),大概情况给大伙理一下,故障原因和知识点都给理一下~
故障原因:由于更改了一个集群的admin的密码,受管理节点(也就是应用节点)发布程序后重启报错“
Authentication denied: Boot identity not valid”无法启动。

<xxxxxxx 下午xx时xx分xx秒 CST> <Notice> <Log Management> <BEA-170019> <The server log file /home/web/Oracle/Middleware/user_projects/domains/oms_domain/servers/OMSServer_1/logs/OMSServer_1.log is opened. All server side log events will be written to this file.> 
<xxxxxxx 下午xx时xx分xx秒 CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.> 
<xxxxxxx 下午xx时xx分xx秒 CST> <Critical> <Security> <BEA-090402> <Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.> 
<xxxxxxx  下午xx时xx分xx秒 CST> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: weblogic.security.SecurityInitializationException: Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.
weblogic.security.SecurityInitializationException: Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.
        at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.doBootAuthorization(CommonSecurityServiceManagerDelegateImpl.java:960)
        at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1054)
        at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:888)
        at weblogic.security.SecurityService.start(SecurityService.java:141)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        Truncated. see log file for complete stacktrace
Caused By: javax.security.auth.login.FailedLoginException: [Security:090303]Authentication Failed: User weblogic weblogic.security.providers.authentication.LDAPAtnDelegateException: [Security:090295]caught unexpected exception
        at weblogic.security.providers.authentication.LDAPAtnLoginModuleImpl.login(LDAPAtnLoginModuleImpl.java:251)
        at com.bea.common.security.internal.service.LoginModuleWrapper$1.run(LoginModuleWrapper.java:110)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.bea.common.security.internal.service.LoginModuleWrapper.login(LoginModuleWrapper.java:106)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        Truncated. see log file for complete stacktrace

目录

一、修改密码的方法

1.1 已知密码的修改方法:

先改admin管理节点密码,然后再对受管理节点操作。

1.1.1 管理节点

第一步:登录控制台–》安全领域–》用户和组里修改密码
第二步:在域目录下$WLS_HOME/user_projects/domains/{your domain name}/servers/AdminServer/security/ 修改boot.properties里的
username=新的用户名
password=新的密码

[root@test security]# pwd
/home/weblogic/bea/user_projects/domains/domons/servers/AdminServers/security
[root@test security]# cat boot.properties
password=新的用户名   --直接输入就行
username=新的密码  --直接输入就行

这里直接输入用户名和密码就行(铭文)
第三步:保存后重启weblogic服务运行 ./startweblogic.sh
重启运行这个脚本之后,boot.properties的用户密码会被自己加密。

1.1.2 受管理节点(每个节点都要操作)

操作完管理节点,需要先将受管理节点的boot.properties改成最新的然后重启节点。

[root@test security]# pwd
/home/weblogic/bea/user_projects/domains/domons/servers/{server_name}/security
[root@test security]# cat boot.properties
password=新的用户名   --直接输入就行
username=新的密码  --直接输入就行

1.2 不知道密码的修改方法:

在不知道密码的情况的,就无需在控制台上操作了;也先改admin管理节点密码,然后再对受管理节点操作。

1.2.1 管理节点

weblogic有一个adminaccount工具,可以用它来刷新账户密码,用下面的命令来改密码?

java -cp $BEA_HOME/wlserver_10.3/server/lib/weblogic.jar weblogic.security.utils.AdminAccount {username} {password} . 
--结尾有个点

然后将生成的文件替换掉域目录下的DefaultAuthenticatorInit.idift
如图:

[root@test security]# pwd
/home/weblogic/bea/user_projects/domains/{server_name}/security
[root@test security]# ll DefaultA*
total 36
-rwxr-xr-x 1 weblogic weblogic 3301 oct 29 2016 DefaultAuthenticatorInit.ldift

替换之后再修改boot.properties文件里的用户名和密码
再重启服务startweblogic.sh

1.2.2 受管理节点(每个节点都要操作)

操作完管理节点,再对受管理节点

[root@test security]# pwd
/home/weblogic/bea/user_projects/domains/domons/servers/{server_name}/security
[root@test security]# cat boot.properties
password=新的用户名   --直接输入就行
username=新的密码  --直接输入就行
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论