---
title: "解决DB2 V9.5中用户认证的问题(SQL30082N） ."
author: "flypeace"
date: "2015-06-29T15:49:39Z"
tags: []
categories: ["数据库"]
slug: "db2-v9-5-sql30082n"
draft: false
lastmod: "2015-06-29T15:49:39Z"
id: 2222869
url: "https://host.iteye.com/blog/2222869"
---

用db2 connect to testdb user \*\** using \*\*\**

结果报 SQL30082N Security processing at the server failed.

但是如果直接用实例用户登录，不输密码就可以。

后来找到一个帖子，解决aix下的问题:

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014172930

 

大概意思是说：

 

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

 

解决办法：

aix下：

        修改 /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

linux下：

      /etc/pam.d/system-auth-ac

将：

password    sufficient    pam\_unix.so sha512 shadow nullok try\_first\_pass use\_authtok

换成：

password    sufficient    pam\_unix.so md5 shadow nullok try\_first\_pass use\_authtok