[经验总结]解决DB2 9.5.2中用户认证的问题(SQL30082N)

本文介绍了在Ubuntu 8.10 64位服务器上安装DB2 Express-C v9.5.2后遇到的数据库连接问题及解决方案。通过更改/etc/pam.d/common-password文件中的密码HASH算法,并使用passwd命令重置密码,解决了因密码HASH长度过长导致的连接失败问题。

在Ubutun 8.10 64bit server上安装了DB2 Express-C v9.5.2,将Mars服务端程序移植过去,却发现数据库怎么也连不上,出错信息如下:

ERROR:
SQL30082N Security processing failed with reason "15" ("PROCESSING FAILURE"). SQLSTATE=08001

折腾了半个小时,发现用实例拥有者db2inst1用户登录,连接数据库时将密码和用户名置空就可以成功连接,真是奇了怪了。

刚才在IBM的论坛里找到了答案(http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14174958)

tamers网友提出的解决办法:

I had the same problem on Ubuntu v8.10. I replaced the following line in /etc/pam.d/common-password password success=1 default=ignore pam_unix.so obscure sha512with the line below:
password success=1 default=ignore pam_unix.so obscure md5 then, reset the passwords of the db2 users using "passwd" command. and the problem solved.
Thanks for the clue above.

STEP1 将/etc/pam.d/common-password文件中下面这行:

password success=1 default=ignore pam_unix.so obscure sha512

替换成:

password success=1 default=ignore pam_unix.so obscure md5

STEP2

在SHELL中运行 passwd命令更改密码。

OK!

为什么要这样做,_mihai_一语道破天机:

I am referring to the one the operating system is using to compute the hash for the password.
It is very likely producing a hash that is bigger than what DB2 supports and that is why you are seeing the error.

操作系统对密码采取了不同的HASH算法,很可能HASH后的密码串长度超过了DB2支持的最长密码长度。

所以,_mihai_的建议是:

You are likely using sha512, change it to sha256 or md5, it should work fine.

将sha512的HASH算法改为sha256或者md5算法。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值