Weblogic8.1 设置boot.properties文件

作用是让server启动时自动从boot.properties文件中读取用户名和密码,并登录

以下是文档原文:

Setting theBoot Login for WebLogic Server

The WebLogic Server uses the login information contained in theboot.propertiesfile to start the server. This file contains ausernameandpasswordthat must match a username and password in the configured authentication policy. Theboot.propertiesfile is located in the WebLogic Server domain directory on the machine on which the Security Service Module is installed, for example:

BEA_HOME/user_projects/domains/mydomain

If you used a username ofsystemand a password ofweblogic, then modify WebLogic Serverboot.propertiesin the domain as follows:

user = system
password = weblogic

The next time you start the WebLogic Server, the username and password you specified are encrypted.

上面的方式,适用于admin server,

若是managed server则要进入

BEA_HOME/user_projects/domains/mydomain
后,相应的managed server的相应目录

并创建boot.properties文件。



WebLogic 中,若 `boot.properties` 文件密码错误或文件损坏,导致指定用户登录失败,出现 `weblogic.security.providers.authentication.LDAPAtnDelegateException: [Security:090295] caught unexpected exception, No such object` 错误,可采用以下解决办法: #### 重置 `boot.properties` 文件 若 `boot.properties` 文件损坏,可先备份该文件,然后将其删除。之后在下次启动 WebLogic 服务器时,系统会提示输入用户名和密码,输入正确信息后,WebLogic 会重新生成 `boot.properties` 文件并加密保存密码。 #### 手动更新密码 手动更新 `boot.properties` 文件中的密码。可使用 WebLogic 的加密 API 对新密码进行加密,示例代码如下: ```java import weblogic.security.internal.SerializedSystemIni; import weblogic.security.internal.encryption.ClearOrEncryptedService; public class PasswordEncryptor { public static void main(String[] args) { if (args.length != 1) { System.out.println("Usage: java PasswordEncryptor <plaintext_password>"); return; } String plaintextPassword = args[0]; String domain = "/weblogic/bea/user_projects/domains/ha_domain/"; weblogic.security.internal.SerializedSystemIni.EncryptionService service = SerializedSystemIni.getEncryptionService(domain); ClearOrEncryptedService encryption = new ClearOrEncryptedService(service); String encryptedPassword = encryption.encrypt(plaintextPassword); System.out.println("Encrypted Password: " + encryptedPassword); } } ``` 将上述代码保存为 `PasswordEncryptor.java`,然后编译并运行: ```bash javac PasswordEncryptor.java java PasswordEncryptor your_plaintext_password ``` 将输出的加密密码替换 `boot.properties` 文件中的密码。 #### 检查文件权限 确保 `boot.properties` 文件具有正确的读写权限,可使用以下命令设置: ```bash chmod 600 /path/to/your/domain/servers/AdminServer/security/boot.properties ``` #### 检查密码复杂度 若密码包含特殊字符,可能会引发问题。确保密码不包含可能导致解析错误的特殊字符,若密码中有特殊字符,可尝试更换密码。 #### 检查 LDAP 置 由于错误信息涉及 LDAP,需检查 WebLogic 的 LDAP 置是否正确,包括 LDAP 服务器地址、端口、绑定用户等信息。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值