Results 1 to 13 of 13
  1. #1
    Join Date
    Apr 2016
    Posts
    10

    Answered: Cant connect to DB with new User

    i am new in working with DB2 (Express-C 10.5). I just installed the DB an so far everything is working fine. Because I don´t think its a good idea to work with the instance user i wanted to add a new Database and a User, which hast only access to this DB. I am working on Linux so I created a new User on OS Level and set a password via the root account. Than I created a new DB and connected to it with the instance User. After that i granted CONNECT TO DATABASE to the new User. Than I reset the connection and tried to CONNECT with the new user but i get an error that Username or Password are incorrect. I tried to connect to the new DB with the instance User, which works fine. Can anyone help me what i am doing wrong? (I checked Username and password several times. They are correct)

  2. Best Answer
    Posted by db2mor

    "Give *full* details of your distro, is it RedHat Enterprise Linux, SuSe, Unbuntu , Centos and then give the distro version.

    Keep all the user-names and group names in lowercase in your operating-system (inside DB2 they will all be folded to uppercase unless you double-quote them)."


  3. #2
    Join Date
    Apr 2012
    Posts
    1,006
    Provided Answers: 16
    Check the restrictions on the length of the account-name, the length of the passwords, and whether the account-name or pasword has any special characters. Try short simple userid/password also to eliminate this.

  4. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    does DB2 accept authentication from *NIX user accoutns or do they also need to be declared within the DB itself?
    I'd rather be riding on the Tiger 800 or the Norton

  5. #4
    Join Date
    Apr 2012
    Posts
    1,006
    Provided Answers: 16
    Are you studying the documentation in the on-line knowledge center? By default, DB2 will get Linux to authenticate, but DB2 has some restrictions per my previous post.

  6. #5
    Join Date
    Apr 2016
    Posts
    10
    Quote Originally Posted by db2mor View Post
    Check the restrictions on the length of the account-name, the length of the passwords, and whether the account-name or pasword has any special characters. Try short simple userid/password also to eliminate this.
    My username has only 3 characters and the password is a 6 character. None of them has any special characters.

    I find this in db2diag.log:
    ` 2016-04-14-10.25.57.569432+120 E860044E458 LEVEL: Severe PID : 27232 TID : 140473930934080 PROC : db2bp INSTANCE: db2inst1 NODE : 000 HOSTNAME: XXXXXXXXXX FUNCTION: DB2 UDB, bsu security, sqlexGetDefaultLoginContext, probe:150 MESSAGE : ADM13001E Plug-in "IBMOSauthclient" received error code "-2" from the DB2 security plug-in API "db2secGetDefaultLoginContext" with the error message " "

  7. #6
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    What's the exact username?
    Regards,
    Mark.

  8. #7
    Join Date
    Apr 2016
    Posts
    10
    I tried it with different ones: LIP_USER,LIP, testuser

  9. #8
    Join Date
    Apr 2012
    Posts
    1,006
    Provided Answers: 16
    Give full details of the Linux distro, and the output of uname -a . What is the case (lower/upper) of the account name in the operating-system (or whatever performs the authentication) ?. I usually leave the usernames in the operating system in lowercase. Are you aso using default authentication settings in DB2?

  10. #9
    Join Date
    Apr 2016
    Posts
    10
    Quote Originally Posted by db2mor View Post
    Give full details of the Linux distro, and the output of uname -a . What is the case (lower/upper) of the account name in the operating-system (or whatever performs the authentication) ?. I usually leave the usernames in the operating system in lowercase. Are you aso using default authentication settings in DB2?
    Linux XXXXX 3.12.28-4-default #1 SMP Thu Sep 25 17:02:34 UTC 2014 (9879bd4) x86_64 x86_64 x86_64 GNU/Linux
    Linux version 3.12.28-4-default (geeko@buildhost) (gcc version 4.8.3 20140627 [gcc-4_8-branch revision 212064] (SUSE Linux) ) #1 SMP Thu Sep 25 17:02:34 UTC 2014 (9879bd4)

    Bei User ist "LIP" all in upper Case.

    I use the default authentification setting from DB2 (to be honest i don´t know how i could change them if i wanted that to do )

    What I did was the following:
    - Create new User from the root user
    - set a password for that user
    - open a shell with new user
    - set the path variable
    - tried "db2 list db directory" --> is working
    - tried to connect with "db2 connect to SAMPLE" -->SQL30082N Security processing failed with reason "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001
    - tried other database --> SQL30082N Security processing failed with reason "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001
    - tried "db2 connect to sample USER db2inst1 USING XXX" --> working
    - reset connection
    - tried "db2 connect to sample USER LIP USING XXX" --> SQL30082N Security processing failed with reason "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001

  11. #10
    Join Date
    Jan 2003
    Posts
    4,286
    Provided Answers: 5
    If I remember correctly, your usernames in Linux need to be all lower case. We use Linux, and we never put in a user with uppercase in their name.

    Andy

  12. #11
    Join Date
    Apr 2012
    Posts
    1,006
    Provided Answers: 16
    Give *full* details of your distro, is it RedHat Enterprise Linux, SuSe, Unbuntu , Centos and then give the distro version.

    Keep all the user-names and group names in lowercase in your operating-system (inside DB2 they will all be folded to uppercase unless you double-quote them).

  13. #12
    Join Date
    Apr 2016
    Posts
    10
    Quote Originally Posted by db2mor View Post
    Give *full* details of your distro, is it RedHat Enterprise Linux, SuSe, Unbuntu , Centos and then give the distro version.

    Keep all the user-names and group names in lowercase in your operating-system (inside DB2 they will all be folded to uppercase unless you double-quote them).
    NAME="SLES"
    VERSION="12"
    VERSION_ID="12"
    PRETTY_NAME="SUSE Linux Enterprise Server 12"
    ID="sles"
    ANSI_COLOR="0;32"
    CPE_NAME="cpe:/o:suse:sles:12"

  14. #13
    Join Date
    Apr 2016
    Posts
    10
    it really was the user name..... i tried a new one all in lower case now it is working. Thanks very much for your help.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •