ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Setting UserIdentifier using C, getting 2035

Post new topic  Reply to topic
 Setting UserIdentifier using C, getting 2035 « View previous topic :: View next topic » 
Author Message
msathe
PostPosted: Thu Dec 01, 2005 5:10 am    Post subject: Setting UserIdentifier using C, getting 2035 Reply with quote

Newbie

Joined: 01 Dec 2005
Posts: 3

hi,

Im trying to connect to a remote QM using mqconnx and I want to send PCF messages. only 'mqm' user has admin permission on the QM. so i have to run the program by logging in as 'mqm' user id from the client machine. otherwise it throws 2035. I tried to set the user id in the program:

strcpy(ClientConn.UserIdentifier, "mqm");
strcpy(ClientConn.Password, "apple1");

but it does not work. In Java even if we do not specify the user id in the MQEnv and the program is running as a different user then also the connection goes thru fine.

Thanks
[/i]
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Dec 01, 2005 5:28 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can't override the native OS user in the C++ API.

The Java API can't access the native OS User. If no user is specified, the Java API specifies a blank user. In the default configuration, a blank user is treated as the MQM user, thus having full priviledges...

I don't remember the name of the setting that allows you to disable this treatment of a blank user... and I solve this security flaw in a different manner, myself.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
msathe
PostPosted: Thu Dec 01, 2005 5:39 am    Post subject: Reply with quote

Newbie

Joined: 01 Dec 2005
Posts: 3

thanks for the quick response.

I cannot run the program as a 'mqm' user or any specific user. So the authentication info has to be constructed in the runtime.

Could you please tell me if there is any workaround. or the way you deal with this problem.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Dec 01, 2005 5:51 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Sorry.

I made a mistake. The MQCONNX call can override the userid.

Just not in the fields you are using.

In v5, the field I think you want is the "Remote Security ID" in the MQCD.

The User Identifier field and password field you are trying to use are marked for LU6.2 only, not for TCP/IP.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
msathe
PostPosted: Thu Dec 01, 2005 6:26 am    Post subject: Reply with quote

Newbie

Joined: 01 Dec 2005
Posts: 3

thanks,

But Im still getting the same error. I tried following.

strcpy(ClientConn.RemoteUserIdentifier, "mqm");
strcpy(ClientConn.RemotePassword, "apple1");
strcpy(ClientConn.RemoteSecurityID, "mqm");

Note: RemoteSecurityID is not available at all libraries. It got compiled at one location.

What is 'LongRemoteUserIdPtr' and 'LongRemoteUserIdLength'. how to use it and set its value. Do we have to use it.
Back to top
View user's profile Send private message
oz1ccg
PostPosted: Fri Dec 02, 2005 11:57 am    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

You can't overwrite the user id on the C client, it will pass on the signed on userid.....

To override it you need a security exit of some kind.

You can write your own, buy one like the Tivoli package.
There are also some free versions like my BlockIP2 at http://www.mrmq.dk/BlockIP2.htm

Just my $0.02
_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
hopsala
PostPosted: Fri Dec 02, 2005 11:23 pm    Post subject: Re: Setting UserIdentifier using C, getting 2035 Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

msathe wrote:
I cannot run the program as a 'mqm' user or any specific user. So the authentication info has to be constructed in the runtime.
?
No process on any operation system on earth can run "with no user", what did you mean by this?
msathe wrote:
only 'mqm' user has admin permission on the Q

But anyway, no need for all this messing about with exits - Just give the user you wish to use admin permissions, or run your appl under mqm. Look up "setmqaut" here and in the manuals; If this is a test system you can remove authorization checks completely.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Setting UserIdentifier using C, getting 2035
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.