CREATE USER vows
Posted in 2013
Topics: Security, Permissions & Auditing
11.70.FC7 / Linux
I'm looking into internal db authentication. According to the manual "When the
USERMAPPING parameter is set, internal user authentication takes precedence
over OS authentication"
I have USERMAPPING set to BASIC. I tried this out:
create database testusr with log;create user "snorri" with password "junk0101";
The I try to connect (Genero program):
connect to "testusr" user "snorri" using p;
When p is "junk0101" I get -951 (incorrect password ...)
but when p is set to my os password, it works fine.
Am I missing something obvious here?
Thanks in advace,
-Snorri
You are missing something, but it may not be obvious. I suppose your
version already works like this:
1- For a user mapping to succeed you need to create a file called
/etc/informix/allowed.surrogates and put the following line inside:
users:snorri
2- Run "onmode -cache surrogates"
3- If no errors are returned try again the authentication
The behavior you're seeing is this:
1- You try to connect with your internal user, but the engine needs to map
it to the "same" OS user (for properties like UID, GID, $HOME etc.)
2- It fails because the user is not in the users that can be mapped (in the
file above)
3- Engine tries "OS authentication" and it works when you give the OS
password and fails when you try the "internal" password
You should have a message similar to this in your online.log:
08/19/13 17:49:06 Warning: The user snorri, is not in the surrogates file
/etc/informix/allowed.surrogates, or was not loaded into
the surrogate cache.
Regards.
On Mon, Aug 19, 2013 at 5:17 PM, SNORRI BERGMANN <snorri@init.is> wrote:
> 11.70.FC7 / Linux
>
> I'm looking into internal db authentication. According to the manual "When
> the
> USERMAPPING parameter is set, internal user authentication takes precedence
> over OS authentication"
>
> I have USERMAPPING set to BASIC. I tried this out:
>
> create database testusr with log;> create user "snorri" with password "junk0101";
>
> The I try to connect (Genero program):
>
> connect to "testusr" user "snorri" using p;
>
> When p is "junk0101" I get -951 (incorrect password ...)
> but when p is set to my os password, it works fine.
>
> Am I missing something obvious here?
>
> Thanks in advace,
> -Snorri
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--089e0149d0acc670e804e44ff339
You have to map user sorri to an os user.
Art
On Aug 19, 2013 12:17 PM, "SNORRI BERGMANN" <snorri@init.is> wrote:
> 11.70.FC7 / Linux
>
> I'm looking into internal db authentication. According to the manual "When
> the
> USERMAPPING parameter is set, internal user authentication takes precedence
> over OS authentication"
>
> I have USERMAPPING set to BASIC. I tried this out:
>
> create database testusr with log;> create user "snorri" with password "junk0101";
>
> The I try to connect (Genero program):
>
> connect to "testusr" user "snorri" using p;
>
> When p is "junk0101" I get -951 (incorrect password ...)
> but when p is set to my os password, it works fine.
>
> Am I missing something obvious here?
>
> Thanks in advace,
> -Snorri
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a1133e3306f4c4504e4503b52
Thank you Art and Fernando. I had my surrogates file messed up. So now if I want all my os users to be authenticated by the db I need to set USERS:1..1000 :) Regards, -Snorri