Go Back   Rhinocerus > Newsgroup > Newsgroup comp.databases.* > Newsgroup comp.databases.ibm-db2

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-21-2005, 02:16 PM
DB2-newbie
Guest
 
Posts: n/a
Default Validation of user logins

As a newbie to DB2 I have a strange problem on a zSeries linux box I
hope someone can answer.

I have created a linux user,

user=mytest
pw=mytest

who is the instance owner and has created a database called mydatabase
with our application schema.

When entering db2 I can enter ok via,

db2> connect to mydatabase

This allows me access to the db where I can load/view data in the
normal fashion. Trouble is we want to do this via an application which
requires us to enter (understandably) a username and password.
Everything I try I ends up with;

[IBM][CLI Driver] SQL30082N Attempt to establish connection failed
with security reason "24" ("USERNAME AND/OR PASSWORD INVALID").
SQLSTATE=08001

So I thought a typo had been made when entering the password when
creating the user. So I went back into db2 and tried;

db2>connect to mydatabase user mytest using mytest

and low and behold I get;

SQL30082N Attempt to establish connection failed with security reason
"24"
("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001

Exactly the same error although the password is correct for the linux
user as it is how I logon to the machine.

The question is why can't I login to db2 using this password. Is there
a way to alter or view the password using the root acount ?

Is there a procedure for checking the authenticity/status of users
allowed to login to a given database ?

Any help much appreciated.

Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 11-22-2005, 01:10 AM
aixunix@gmail.com
Guest
 
Posts: n/a
Default Re: Validation of user logins

It is not a good practise to use instance owner for application usage.
You should:
1. Create a Linux User ID <user_id> with password
2. create schema <schema_name> authorization <user_id>
3. grant rights to user.....(of course incoming connection right)

Reply With Quote
  #3 (permalink)  
Old 11-22-2005, 06:00 AM
Mark Yudkin
Guest
 
Posts: n/a
Default Re: Validation of user logins

> Trouble is we want to do this via an application which
> requires us to enter (understandably) a username and password.


Actually, it is not understandable why you would want to do this. It is much
more logical and a lot less annoying to allow the user to connect to the
database using his operating system logon, rather than requiring him to log
on yet again.

In any case, you must define your end user as a "local" user on the target
machine, and that user must be distinct from the instance owner. This is
regardless of your logon strategy.

"DB2-newbie" <trevork@talk21.com> wrote in message
news:1132586191.814794.92470@g14g2000cwa.googlegro ups.com...
> As a newbie to DB2 I have a strange problem on a zSeries linux box I
> hope someone can answer.
>
> I have created a linux user,
>
> user=mytest
> pw=mytest
>
> who is the instance owner and has created a database called mydatabase
> with our application schema.
>
> When entering db2 I can enter ok via,
>
> db2> connect to mydatabase
>
> This allows me access to the db where I can load/view data in the
> normal fashion. Trouble is we want to do this via an application which
> requires us to enter (understandably) a username and password.
> Everything I try I ends up with;
>
> [IBM][CLI Driver] SQL30082N Attempt to establish connection failed
> with security reason "24" ("USERNAME AND/OR PASSWORD INVALID").
> SQLSTATE=08001
>
> So I thought a typo had been made when entering the password when
> creating the user. So I went back into db2 and tried;
>
> db2>connect to mydatabase user mytest using mytest
>
> and low and behold I get;
>
> SQL30082N Attempt to establish connection failed with security reason
> "24"
> ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001
>
> Exactly the same error although the password is correct for the linux
> user as it is how I logon to the machine.
>
> The question is why can't I login to db2 using this password. Is there
> a way to alter or view the password using the root acount ?
>
> Is there a procedure for checking the authenticity/status of users
> allowed to login to a given database ?
>
> Any help much appreciated.
>



Reply With Quote
  #4 (permalink)  
Old 11-22-2005, 09:53 AM
DB2-newbie
Guest
 
Posts: n/a
Default Re: Validation of user logins

Less annoying but more secure !!!

Well as it happens, for this test the linux user + password are the
same as db user so it does not matter.

When we connect using,

db2> connect to mydatabase

It works as the linux user is the default, but there is no way of
achieving this in a C++ application which prompts for a user/password
combination. All I want to know is why

db2> connect to mydatabase user mytest using mytest

fails to login.

How can I determine what is wrong ?

Reply With Quote
  #5 (permalink)  
Old 11-22-2005, 09:56 AM
DB2-newbie
Guest
 
Posts: n/a
Default Re: Validation of user logins

3. grant rights to user.....(of course incoming connection right)

This could be what we are missing....how do we do this ?

Reply With Quote
  #6 (permalink)  
Old 11-22-2005, 02:40 PM
DB2-newbie
Guest
 
Posts: n/a
Default Re: Validation of user logins

Sorted....we had wrong password.

We did not discover this before as we had assumed the password=mytest.
To login we were using root user then,

su - mytest

Of course as we were root we never entered the password and made a
wrong assumption.

Thanks for the help.

Reply With Quote
  #7 (permalink)  
Old 11-25-2005, 08:55 AM
Mark Yudkin
Guest
 
Posts: n/a
Default Re: Validation of user logins

No, it is typically less secure to demand a password. You can control your
O/S logon with all sorts of two-factor authentication schemes (SmartCard,
SecurID); however you cannot do this with DB2 - except by telling DB2 to
rely on the O/S login (Kerberos).

"DB2-newbie" <trevork@talk21.com> wrote in message
news:1132656832.854620.116990@o13g2000cwo.googlegr oups.com...
> Less annoying but more secure !!!
>
> Well as it happens, for this test the linux user + password are the
> same as db user so it does not matter.
>
> When we connect using,
>
> db2> connect to mydatabase
>
> It works as the linux user is the default, but there is no way of
> achieving this in a C++ application which prompts for a user/password
> combination. All I want to know is why
>
> db2> connect to mydatabase user mytest using mytest
>
> fails to login.
>
> How can I determine what is wrong ?
>



Reply With Quote
  #8 (permalink)  
Old 11-25-2005, 08:55 AM
Mark Yudkin
Guest
 
Posts: n/a
Default Re: Validation of user logins

You really do have a very strange concept of security...

"DB2-newbie" <trevork@talk21.com> wrote in message
news:1132674012.268461.108440@g47g2000cwa.googlegr oups.com...
> Sorted....we had wrong password.
>
> We did not discover this before as we had assumed the password=mytest.
> To login we were using root user then,
>
> su - mytest
>
> Of course as we were root we never entered the password and made a
> wrong assumption.
>
> Thanks for the help.
>



Reply With Quote
  #9 (permalink)  
Old 11-25-2005, 05:54 PM
Knut Stolze
Guest
 
Posts: n/a
Default Re: Validation of user logins

Mark Yudkin wrote:

> No, it is typically less secure to demand a password. You can control your
> O/S logon with all sorts of two-factor authentication schemes (SmartCard,
> SecurID); however you cannot do this with DB2 - except by telling DB2 to
> rely on the O/S login (Kerberos).


You can write your own security plugin, and once you're there you can do
_anything_ you might want to do (and can implement).

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Does (Clinical)Tables need validation ??? SAS_learner Newsgroup comp.soft-sys.sas 1 04-01-2008 12:40 AM
Re: Validation Process Sigurd Hermansen Newsgroup comp.soft-sys.sas 2 11-30-2007 04:11 PM
Re: Validation Process SAS_learner Newsgroup comp.soft-sys.sas 0 11-30-2007 02:34 PM



All times are GMT. The time now is 06:53 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.