<?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; problem</title>
	<atom:link href="http://blog.stastnarodina.com/honza-en/tag/problem/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>Debian Lenny VIM broken dependency</title>
		<link>http://blog.stastnarodina.com/honza-en/spot/debian-lenny-vim-broken-dependency/</link>
		<comments>http://blog.stastnarodina.com/honza-en/spot/debian-lenny-vim-broken-dependency/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 00:47:38 +0000</pubDate>
		<dc:creator>honza</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[WD MyBook]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://blog.stastnarodina.com/honza-en/?p=14</guid>
		<description><![CDATA[
<p>Today I ran apt-get update &amp;&amp; apt-get dist-upgrade on my Debian
Lenny installed on WD MyBook as I ussually do. It removed VIM (I let it as
I thought it was just replaced by another package). I tried to run vim after
the upgrade but it was really uninstalled. Trying to install it again by apt-get
install I got The following […]</p>

<!-- by Texy2! -->]]></description>
			<content:encoded><![CDATA[
<p>Today I ran <code>apt-get update &amp;&amp; apt-get dist-upgrade</code> on
my Debian Lenny installed on WD MyBook as I ussually do. It removed VIM (I let
it as I thought it was just replaced by another package). I tried to run
<code>vim</code> after the upgrade but it was really uninstalled. Trying to
install it again by <code>apt-get install</code> I got</p>

<pre><code>The following packages have unmet dependencies:
  vim: Depends: vim-runtime (= 1:7.1.293-3)
         but 1:7.1.293-3+lenny1 is to be installed
E: Broken packages</code></pre>

<p>I tried to uninstall vim-runtime. It didn't help. I don't have time to
solve it now so I can't give a solution. If you encountered the same problem
and have a solution to this problem, I'd really appretiate your comment.</p>

<p>It's quite sad that Debian repository is not consistent and one gets errors
using <code>apt-get</code>.</p>

<!-- by Texy2! -->]]></content:encoded>
			<wfw:commentRss>http://blog.stastnarodina.com/honza-en/spot/debian-lenny-vim-broken-dependency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
