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 » User Exits » Change userid and password

Post new topic  Reply to topic
 Change userid and password « View previous topic :: View next topic » 
Author Message
longtail
PostPosted: Sat Jun 28, 2008 9:54 pm    Post subject: Change userid and password Reply with quote

Novice

Joined: 27 Jan 2008
Posts: 15

I want to WMBT ( in developping enviroment on windows) connecting to the BROKER ( and QM) in linux, I have the userid and password of wbiadmin. The problem is on windows I don't want to run another instance of WMBT as wbiadmin ,it's too troublesome.The best choice is the connect to broker with a exit to change the userid and password. And I gooled some articles,found from " http://www.tek-tips.com/viewthread.cfm?qid=895514&page=7 ", but I translate the code to Java so the wmbt could use it, but seems not to work at all, wmbt says :user *** not authorized to access the QM.
case MQXR_INIT_SEC:
*pDataLength = 9;
pChannelExitParms->ExitResponse = MQXCC_SEND_SEC_MSG;
strncpy((char *)AgentBuffer, "WHOAREYOU\0", 10);
fprintf(fp,"Scy exit called for INIT_SEC, resp=%d, buff=%s\n", pChannelExitParms->ExitResponse, (char *)AgentBuffer);
break;
case MQXR_SEC_MSG:
fprintf(fp,"Scy exit called for SEC_MSG, resp=%d, buff=%.10s\n", pChannelExitParms->ExitResponse, (char *)AgentBuffer);
*pDataLength = 20;
pChannelExitParms->ExitResponse = MQXCC_SEND_SEC_MSG;

/******CHANGE userid/password in the following line:********/
strncpy((char *)AgentBuffer, "A000MATA6P207712100\0", 21);
//strncpy((char *)AgentBuffer, "A000MATA6P 207712100\0", 21);
//strncpy((char *)AgentBuffer, "A000Userid Password\0", 21);
/******END OF CHANGE userid/password: **********************/

fprintf(fp,"Scy exit called for SEC_MSG, resp=%d, buff=%.10s\n", pChannelExitParms->ExitResponse, (char *)AgentBuffer);
break;

i know it's only 2-3 lines code, but don't know how the write it , Could any give me a hint? Thanks very much!
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Mon Jun 30, 2008 11:20 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3253
Location: London, ON Canada

Hello,

Please read the following post:
http://www.mqseries.net/phpBB2/viewtopic.php?t=20523

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » User Exits » Change userid and password
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.