DB2 9.1 Installation notes for Ubuntu 10.04

Installing DB2 on quite recent Linux systems (like Ubuntu 10.04) goes smoothly as described on instructions on this site. You will notice that DB2 is up and running, you can even create sample database, but there is one problem. No application, whether it is IBM Data Studio or some PHP application, cannot connect to database.

Reason is very simple. Ubuntu 10.04 like many other installations use SHA512 password encryption by default. This is not a problem for DB2 9.7, but DB2 9.1 is limited to md5. And remedy is also very simple if you know it, otherwise you’ll be banging your head to wall for hours.

As root you must edit /etc/pam.d/common-password file and change encryption.

sudo nano /etc/pam.d/common-password

There is a line

password [success=2 default=ignore] pam_unix.so obscure sha512

Change it to

password [success=2 default=ignore] pam_unix.so obscure md5

Now you have to recreate passwords for all accounts that need connection to DB2. This includes instance owner, fenced user, and das user

sudo passwd db2inst1
sudo passwd db2fenc1
sudo passwd dasusr1

After this is done edit /etc/pam.d/common-password file back to use SHA512.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

  • Enter your email address to follow this blog and receive notifications of new posts by email.

    Join 105 other followers

%d bloggers like this: