Author |
Message
|
deuspi |
Posted: Mon Oct 07, 2002 7:32 am Post subject: Authentication problem |
|
|
Newbie
Joined: 20 Jan 2002 Posts: 9 Location: Paris, France
|
Hi there,
I'm developping a VB MQSeries application. My customers just asked me if it was possible to specify a different UserID than the one corresponding to the Windows logon.
I use the COM Interface, and I noticed in the doc that the UserID field is Read/Write. But when I try to set it to something else than my Windows UserID, the MQSeries server ignores it and keeps my Windows logon instead in this UserID field.
Any help would be greatly appreciated. |
|
Back to top |
|
 |
clindsey |
Posted: Mon Oct 07, 2002 8:05 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
I haven't done this in VB but I have in C. I am guessing it should work the same.
To setup a different id, set the alternateuserid field in the mqmd.
Then you also have to specify MQOO_ALTERNATE_USER_AUTHORITY in the open options for the
queue.
Charlie |
|
Back to top |
|
 |
deuspi |
Posted: Tue Oct 08, 2002 7:05 am Post subject: |
|
|
Newbie
Joined: 20 Jan 2002 Posts: 9 Location: Paris, France
|
Thanks for your reply.
I tried using the MQOO_ALTERNATE_USER_AUTHORITY option in order to open the queues. This doesn't seems to work, but I've read somewhere in the doc that this field is ignored on Windows platforms. So I think my test is ineffective in my dev environment.
I'm always receiving MQRC_NOT_AUTHORIZED (2035) when I supply a different user in the AlternateUserID field.
My customers' MQSeries server runs on an OpenVMS system, and I hope this is only an environment problem. I think I should try once again at the customers' place. |
|
Back to top |
|
 |
clindsey |
Posted: Tue Oct 08, 2002 10:02 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
MQOO_ALTERNATE_USER_AUTHORITY is ignored on the Windows
clients (WIN98, WIN95, WIN31) but not on NT & 2000.
It sounds as though it may be working since you are getting
the 2035 when you use it. You will need to set up access for
the alternate user if you haven't already. Either add the user
to the mqm group or use setmqaut to grant specific access to
the objects needed.
Charlie |
|
Back to top |
|
 |
deuspi |
Posted: Wed Oct 09, 2002 1:07 am Post subject: |
|
|
Newbie
Joined: 20 Jan 2002 Posts: 9 Location: Paris, France
|
I think just as you do that it seems to be working... even if I get the 2035.
However the user I supplied in the AlternateUserID field does exist both in the mqm group and in the authorizations since I used setmqaut to grant him the access. |
|
Back to top |
|
 |
mrlinux |
Posted: Wed Oct 09, 2002 4:42 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Have you did a refresh security or restarted the queue manager since the
setmqaut ??? _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
deuspi |
Posted: Thu Oct 10, 2002 12:26 am Post subject: |
|
|
Newbie
Joined: 20 Jan 2002 Posts: 9 Location: Paris, France
|
Okay I found the solution.
I used to put my alternate user in the AlternateUserID field of the queue. Then I accessed the queue with the AccessQueue method of the QueueManager class.
Now I found out that I could supply the AlternateUserID as an optional argument of the AccessQueue method. It seems to work just fine.
Thanks for your help which was really usefull to me.
Pierre |
|
Back to top |
|
 |
|