<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Honza's perspective &#187; DB2</title>
	<atom:link href="http://blog.stastnarodina.com/honza-en/tag/db2/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stastnarodina.com/honza-en</link>
	<description></description>
	<lastBuildDate>Mon, 03 May 2010 09:30:45 +0000</lastBuildDate>
	<language>cs</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>DB2: SQL30082N  Security processing failed with reason &#8220;15&#8243;</title>
		<link>http://blog.stastnarodina.com/honza-en/spot/db2-sql30082n-security-processing-failed-with-reason-15/</link>
		<comments>http://blog.stastnarodina.com/honza-en/spot/db2-sql30082n-security-processing-failed-with-reason-15/#comments</comments>
		<pubDate>Mon, 11 May 2009 21:51:04 +0000</pubDate>
		<dc:creator>honza</dc:creator>
				<category><![CDATA[DB2]]></category>
		<category><![CDATA[problem]]></category>

		<guid isPermaLink="false">http://blog.stastnarodina.com/honza-en/?p=18</guid>
		<description><![CDATA[
<p>If you are getting SQL30082N Security processing failed with reason „15“
(„PROCESSING FAILURE“) when connecting to the db2 database using db2 CONNECT
TO dbname USER username or Connection authorization failure occurred. Reason:
Local security service non-retryable error. ERRORCODE=-4214, SQLSTATE=28000 when
connecting remotely (via JDBC driver) read on. I finally found what causes this
error and a solution! […]</p>
]]></description>
			<content:encoded><![CDATA[
<p>If you are getting</p>

<blockquote>
	<p>SQL30082N Security processing failed with reason „15“ („PROCESSING
	FAILURE“)</p>
</blockquote>

<p>when connecting to the db2 database using <code>db2 CONNECT TO dbname USER
username</code> or</p>

<blockquote>
	<p>Connection authorization failure occurred. Reason: Local security service
	non-retryable error. ERRORCODE=-4214, SQLSTATE=28000</p>
</blockquote>

<p>when connecting remotely (via JDBC driver) read on. I finally found what
causes this error and <strong>a solution</strong>!</p>

<p>[ad]</p>

<h3>Environment</h3>

<ul>
	<li><strong>OS:</strong> Fedora Core 10 64bit</li>

	<li><strong>DB2:</strong> version 9.5, Express edition</li>

	<li>See <a href="#ubuntu">lower for the solution for Ubuntu</a></li>
</ul>

<h3>Problem</h3>

<p>Tho whole problem is in the format of the passwords in
<code>/etc/shadow</code>. DB2 doesn't seem to like the passwords generated when
changing password using the standard <code>passwd</code> command. In Fedora Core
10 the password is hashed using sha-512 and the entry for user
<em>username</em> looks like:</p>

<blockquote>
	<p>username:$6$ef­WWOYRY$z5DNL1kLQ­U4AmPkFBqbQh6LOh­0Qjxq654dS9jE46iP­Np8Zces8I4bP8GLZ3G3RWLo/­6o.LYOV5neYSKxXbL­.M1:14375:0:99999:7:::</p>
</blockquote>

<h3>Solution</h3>

<p>DB2 works fine with passwords hashed with standard crypt function. Password
in the desired format can be obtained by calling <code>openssl passwd
desiredPassword</code>. The output of openssl can be passed to <code>usermod
--password</code> The complete command to change user's password then
look like:</p>

<blockquote>usermod --password `openssl passwd <em>desiredPassword</em>`
<em>usename</em></blockquote>

<h3>Bigger image</h3>

<p>I tried to hand-edit /etc/shadow and insert salted MD5 password, which can
be obtained by <code>openssl passwd -1 desiredPassword</code> and the connection
was sucessfuly established. To sum it up, the whole problem in the end seems to
be that DB2 doesn't like SHA-512 hashes in /etc/shadow. On the other hand, it
works fine with hashes generated by <code>crypt</code> and MD5.</p>

<h3>Changing default algorithm in Fedora Core</h3>

<p>Fedora Core contains a nice tool <code>authconfig</code>. To change the
default hashing algorithm to MD5 run</p>

<blockquote>
	<p>authconfig –passalgo md5 –update</p>
</blockquote>

<p>All the passwords inserted in the password database will be stored in MD5
from now on. It will, of course, not change the hashes of the current
passwords.</p>

<h3 id="ubuntu">Ubuntu</h3>

<p>Ubuntu ships with sha512 as default hash algorithm for passwords in
<code>/etc/shadow</code>. The easiest way to change the default algorithm is to
edit the file /etc/pam.d/common-password and change the line that reads</p>

<blockquote>
	<p>password [success=1 default=ignore] pam_unix.so obscure sha512</p>
</blockquote>

<p>to</p>

<blockquote>
	<p>password [success=1 default=ignore] pam_unix.so obscure md5</p>
</blockquote>

<p>The information about the algorith is also included in the file
<code>/etc/login.defs</code>, which is used by <code>chpasswd</code> for
example. Therefore change the line</p>

<blockquote>
	<p>ENCRYPT_METHOD SHA512</p>
</blockquote>

<p>to</p>

<blockquote>
	<p>ENCRYPT_METHOD MD5</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.stastnarodina.com/honza-en/spot/db2-sql30082n-security-processing-failed-with-reason-15/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to install DB2 Express on Fedora Core 9</title>
		<link>http://blog.stastnarodina.com/honza-en/spot/how-to-install-db2-express-on-fedora-core-9/</link>
		<comments>http://blog.stastnarodina.com/honza-en/spot/how-to-install-db2-express-on-fedora-core-9/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 08:48:20 +0000</pubDate>
		<dc:creator>honza</dc:creator>
				<category><![CDATA[Rational Team Concert]]></category>
		<category><![CDATA[DB2]]></category>
		<category><![CDATA[jazz]]></category>

		<guid isPermaLink="false">http://blog.stastnarodina.com/honza-en/?p=16</guid>
		<description><![CDATA[
<p>I got 2 errors while installing DB2 Express that comes with Rational Team
Concert. Two libraries were missing: libstdc++.so.5 ER­ROR: The required
library file libstdc++.so.5 is not found on the system. Solution: (thanks <a
href="http://tldp.org/">http://tldp.org/</a>…fedora6.html) yum -y install
compat-libstdc++-33 libaio.so.1 ER­ROR: The required library file
libaio++.so.1 is not found on the system. Solution: yum -y install libaio</p>
]]></description>
			<content:encoded><![CDATA[
<p>I got 2 errors while installing DB2 Express that comes with Rational Team
Concert. Two libraries were missing:</p>

<h3>libstdc++.so.5</h3>

<pre>ERROR:
The required library file libstdc++.so.5 is not found on the system.</pre>

<p><strong>Solution:</strong> (thanks <a
href="http://tldp.org/HOWTO/DB2-HOWTO/fedora6.html">http://tldp.org/…fedora6.html</a>)</p>

<pre>yum -y install compat-libstdc++-33</pre>

<h3>libaio.so.1</h3>

<pre>ERROR:
The required library file libaio++.so.1 is not found on the system.</pre>

<p><strong>Solution:</strong></p>

<pre>yum -y install libaio</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.stastnarodina.com/honza-en/spot/how-to-install-db2-express-on-fedora-core-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
