WAS 忘記密碼


 

一、重置密碼

 

1.首先關閉was,ps –ef|grep java 查看java進程號,然后kill -9 XXXX殺掉進程即可。或者使用命令./stopServer.sh server1

2.取消控制台安全驗證 

方法一:/opt/IBM/WebSphere/AppServer/profiles/dmgr01/config/cells/tappsvr01Cell01 目錄下 security.xml文件 在第一個<security:Security標簽里面,從上往下,把第一個找到的enabled="true",改成enabled="false"

方法二:/opt/IBM/WebSphere/AppServer/profiles/dmgr01/bin下執行./wsadmin.sh -conntype NONE

3. 然后啟動WAS,用任意用戶 名進行登錄。

4.點擊:安全性—全局安全性—啟用管理安全性—安全配置向導

5.再打開全局安全性,看界面中,勾選“啟用應用程序安全性”

6.選擇“聯合存儲庫”----配置用戶名、密碼----點擊“完成”---完成配置

7.重新啟動was(記得檢查配置文件中安全性驗證是否恢復)

 

 

二、破解密碼

原理:IBM中WAS的密碼是XOR(eXclusive OR異或)的方式進行編碼encode) 而不是加密。

參考博主目錄對應修改

1.進入/opt/IBM/WebSphere/AppServer/java/8.0/bin

2.執行 java -Djava.ext.dirs=/opt/IBM/WebSphere/AppServer/deploytool/itp/plugins/com.ibm.websphere.v85.core_1.0.100.v20141119_2034/wasJars com.ibm.ws.security.util.PasswordDecoder 被編碼后的字符串 

【ext.dirs的參數為調用com.ibm.ws.security.util.PasswordDecoder類所需要的jar所在目錄,編碼后的字符串以{xor}開頭】

3.各用戶密碼對應的編碼文件

 

$ WAS Admin Console Password:

/opt/WebSphere85/profiles/appprofile/properties/sas.client.props

com.ibm.CORBA.loginUserid=wsadmin

com.ibm.CORBA.loginPassword={xor}GyhrbiYGKmc=

$ WAS admin Console management

/opt/WebSphere85/profiles/dmgrprofile/config/cells/wascell/admin-authz.xml

$ DB password

/opt/WebSphere85/profiles/dmgrprofile/config/cells/wascell/security.xml

-------------------------------------------------------------------------------------------------------------------

反編碼:

java -Djava.ext.dirs=/opt/IBM/WebSphere/AppServer/deploytool/itp/plugins/com.ibm.websphere.v85.core_1.0.100.v20141119_2034/wasJars com.ibm.ws.security.util.PasswordEncoder  密碼


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM