停止啟用了安全性的WAS Server而不手動輸入密碼之第二種選擇
停止啟用了安全性的WAS Server而不手動輸入密碼之第二種選擇
眾所周知的應當是如下最簡單的方式了
%PROFILE_HOME%/bin/stopServer.bat serverXyz -username Xyz -password Xyz
但是用戶名與密碼全是明文了,在某些場景下可能不太符合
現在給出第二種選擇方法
set PROFILE_HOME=D:/IBM/WebSphere/AppServer/6.1/profiles/AppSrvSingle
cd %PROFILE_HOME%/properties
先備份一下 sas.client.props 與 soap.client.props 文件
由於連接的方式有兩種 : SOAP 與 RMI,默認是 SOAP 方式
1. SOAP 方式的修改
打開 soap.client.props 文件,約在第 26 行
com.ibm.SOAP.loginUserid=
com.ibm.SOAP.loginPassword=
默認下,值均為空的,填入目前正在使用的用戶與密碼,比如均為WebSphere
com.ibm.SOAP.loginUserid=WebSphere
com.ibm.SOAP.loginPassword=WebSphere
然後執行
%PROFILE_HOME%/bin/PropFilePasswordEncoder.bat %PROFILE_HOME%/properties/soap.client.props com.ibm.SOAP.loginPassword -Backup
執行成功後,會有如下提示
NOTE: all specified passwords already encoded in target file == %PROFILE_HOME%/properties/soap.client.props
或
NOTE: Backup file %PROFILE_HOME%/properties/soap.client.props.bak contains unencoded passwords
打開 soap.client.props 文件可以看到密碼已經加密,如下
com.ibm.SOAP.loginUserid=WebSphere
com.ibm.SOAP.loginPassword={xor}CDo9DC83Oi06
然後停止WAS Server直接采用如下命令停止WAS Server即可,不需要再輸入用戶名與密碼了
%PROFILE_HOME%/bin/stopServer.bat server1
或
%PROFILE_HOME%/bin/stopServer.bat server1 -conntype SOAP
默認的SOAP連接端口是 SOAP_CONNECTOR_ADDRESS 端口
2. RMI 方式的修改與 SOAP 方式類同
打開 sas.client.props 文件,約在第 90 行
com.ibm.CORBA.loginUserid=
com.ibm.CORBA.loginPassword=
默認下,值均為空的,填入目前正在使用的用戶與密碼,比如均為WebSphere
com.ibm.CORBA.loginUserid=WebSphere
com.ibm.CORBA.loginPassword=WebSphere
然後執行
%PROFILE_HOME%/bin/PropFilePasswordEncoder.bat %PROFILE_HOME%/properties/sas.client.props com.ibm.CORBA.loginPassword -Backup
執行成功後,會有如下提示
NOTE: all specified passwords already encoded in target file == %PROFILE_HOME%/properties/sas.client.props
或
NOTE: Backup file %PROFILE_HOME%/properties/sas.client.props.bak contains unencoded passwords
打開 soap.client.props 文件可以看到密碼已經加密,如下
com.ibm.CORBA.loginUserid=WebSphere
com.ibm.CORBA.loginPassword={xor}CDo9DC83Oi06
需要注意的是 RMI 方式還需要更改如下鍵值
com.ibm.CORBA.loginSource=prompt
為
com.ibm.CORBA.loginSource=properties
然後停止WAS Server直接采用如下命令停止WAS Server即可,不需要再輸入用戶名與密碼了
%PROFILE_HOME%/bin/stopServer.bat server1 -conntype RMI -port 2809
默認的RMI連接端口是 BOOTSTRAP_ADDRESS 端口
眾所周知的應當是如下最簡單的方式了
%PROFILE_HOME%/bin/stopServer.bat serverXyz -username Xyz -password Xyz
但是用戶名與密碼全是明文了,在某些場景下可能不太符合
現在給出第二種選擇方法
set PROFILE_HOME=D:/IBM/WebSphere/AppServer/6.1/profiles/AppSrvSingle
cd %PROFILE_HOME%/properties
先備份一下 sas.client.props 與 soap.client.props 文件
由於連接的方式有兩種 : SOAP 與 RMI,默認是 SOAP 方式
1. SOAP 方式的修改
打開 soap.client.props 文件,約在第 26 行
com.ibm.SOAP.loginUserid=
com.ibm.SOAP.loginPassword=
默認下,值均為空的,填入目前正在使用的用戶與密碼,比如均為WebSphere
com.ibm.SOAP.loginUserid=WebSphere
com.ibm.SOAP.loginPassword=WebSphere
然後執行
%PROFILE_HOME%/bin/PropFilePasswordEncoder.bat %PROFILE_HOME%/properties/soap.client.props com.ibm.SOAP.loginPassword -Backup
執行成功後,會有如下提示
NOTE: all specified passwords already encoded in target file == %PROFILE_HOME%/properties/soap.client.props
或
NOTE: Backup file %PROFILE_HOME%/properties/soap.client.props.bak contains unencoded passwords
打開 soap.client.props 文件可以看到密碼已經加密,如下
com.ibm.SOAP.loginUserid=WebSphere
com.ibm.SOAP.loginPassword={xor}CDo9DC83Oi06
然後停止WAS Server直接采用如下命令停止WAS Server即可,不需要再輸入用戶名與密碼了
%PROFILE_HOME%/bin/stopServer.bat server1
或
%PROFILE_HOME%/bin/stopServer.bat server1 -conntype SOAP
默認的SOAP連接端口是 SOAP_CONNECTOR_ADDRESS 端口
2. RMI 方式的修改與 SOAP 方式類同
打開 sas.client.props 文件,約在第 90 行
com.ibm.CORBA.loginUserid=
com.ibm.CORBA.loginPassword=
默認下,值均為空的,填入目前正在使用的用戶與密碼,比如均為WebSphere
com.ibm.CORBA.loginUserid=WebSphere
com.ibm.CORBA.loginPassword=WebSphere
然後執行
%PROFILE_HOME%/bin/PropFilePasswordEncoder.bat %PROFILE_HOME%/properties/sas.client.props com.ibm.CORBA.loginPassword -Backup
執行成功後,會有如下提示
NOTE: all specified passwords already encoded in target file == %PROFILE_HOME%/properties/sas.client.props
或
NOTE: Backup file %PROFILE_HOME%/properties/sas.client.props.bak contains unencoded passwords
打開 soap.client.props 文件可以看到密碼已經加密,如下
com.ibm.CORBA.loginUserid=WebSphere
com.ibm.CORBA.loginPassword={xor}CDo9DC83Oi06
需要注意的是 RMI 方式還需要更改如下鍵值
com.ibm.CORBA.loginSource=prompt
為
com.ibm.CORBA.loginSource=properties
然後停止WAS Server直接采用如下命令停止WAS Server即可,不需要再輸入用戶名與密碼了
%PROFILE_HOME%/bin/stopServer.bat server1 -conntype RMI -port 2809
默認的RMI連接端口是 BOOTSTRAP_ADDRESS 端口
最後更新:2017-04-02 06:51:39