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

在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算法。

 

 

你可能感兴趣的:(数据库技术)