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 » General Discussion » runmqsc command without acess for start and stop in unix

Post new topic  Reply to topic Goto page 1, 2  Next
 runmqsc command without acess for start and stop in unix « View previous topic :: View next topic » 
Author Message
mqlover
PostPosted: Wed May 14, 2014 6:32 pm    Post subject: runmqsc command without acess for start and stop in unix Reply with quote

Disciple

Joined: 25 Jul 2010
Posts: 176

Hi,

I have created a user id in Unix which has access only to do dspmq and execute the runmqsc command.
Now I have a requirement that the user id should do execute only display command and not start and stop of channels.
Not define channels too.

Kindly could anyone help as to how to achieve this?

Thanks in advance
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed May 14, 2014 7:35 pm    Post subject: Re: runmqsc command without acess for start and stop in unix Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9472
Location: US: west coast, almost. Otherwise, enroute.

mqlover wrote:
Hi,

I have created a user id in Unix which has access only to do dspmq and execute the runmqsc command.

How exactly did you create this userid? What group?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
mqlover
PostPosted: Wed May 14, 2014 7:38 pm    Post subject: Reply with quote

Disciple

Joined: 25 Jul 2010
Posts: 176

Hi,

This user id was created by a security team on AIX. The user id belongs to group mqbrkrs (which mqbroker group). This group also has access to perform MQ and WMB operations.

Thanks
Back to top
View user's profile Send private message
mqlover
PostPosted: Thu May 15, 2014 12:26 am    Post subject: Reply with quote

Disciple

Joined: 25 Jul 2010
Posts: 176

Sorry, my bad, this user id does not belong to any group. I meant niether of MQ or WMB group.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu May 15, 2014 4:13 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9472
Location: US: west coast, almost. Otherwise, enroute.

So, the user id isn't a member of any group? And there are auth rules for this user id?

Does the user id have UID=0 (root)? Can the user id issue root UNIX commands - like shutdown?

Was the user id a member of mqm or broker group previously?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
zpat
PostPosted: Thu May 15, 2014 7:27 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Don't worry about restricting access to the commands.

Set up a userid that is not in the mqm group, but is a member of another group.

Grant that other group display access to the various MQ objects you want to be able to display, using setmqaut commands.

It will also need connect authority to the queue manager.
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
mqlover
PostPosted: Wed May 21, 2014 7:52 pm    Post subject: Reply with quote

Disciple

Joined: 25 Jul 2010
Posts: 176

I got an userid created which is a non mqm user id i.e it does not have any mq previlages.
I got it included into the sudoers file as I was not able to perform
runmqsc <qmgrname>
Now I can run as sudo -u mqm runmqsc <qmgrname>

Using setmqaut I have given permission to connect to the qmgr, but I see that I am able to perform tall the operations like start and stop the channels etc.
I have removed the permission for channels.
I donno how I am still able to do perform all the operations even though I have jus given "connect" permission
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Wed May 21, 2014 8:12 pm    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

RUNMQSC is a setuid program which means that when it runs it effectively runs with 'mqm' authority, this can make it tricky to allow lower levels of authority.

I've not tried it but there are these instructions here:

http://www-01.ibm.com/support/docview.wss?uid=swg21027203

Alternatively you could use a program like my MO72 SupportPac or the MQSCX product. These programs are not setuid programs and are just normal MQI programs capable of running either locally connected or over a client connection. Consequently the MQ authorities work the same as for any other application of that type and limiting the authorities by the user running the program works as expected.

Regards,
Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
PeterPotkay
PostPosted: Thu May 22, 2014 3:17 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

mqlover wrote:
Now I can run as sudo -u mqm runmqsc <qmgrname>

Using setmqaut I have given permission to connect to the qmgr, but I see that I am able to perform tall the operations like start and stop the channels etc.

You are running the program as mqm because you switched to the mqm ID. The mqm ID and any other IDs in the mqm group have 100% access to all the MQ objects in runmqsc, and you can't add or subtract any permissions for them.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 22, 2014 4:50 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqlover wrote:
I donno how I am still able to do perform all the operations even though I have jus given "connect" permission


Because you used sudo to switch from your id to the mqm id when you ran runmqsc. So whatever permissions you have are irrelevant.

Note you don't need to be mqm to run the runmqsc application. It's just very very hard to do anything with it without.

So you could use sudo -u pingo runmqsc and it would work (assuming pingo has OS access to runmqsc) & run with whatever authorities the pingo id has.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqlover
PostPosted: Thu May 22, 2014 6:56 pm    Post subject: Reply with quote

Disciple

Joined: 25 Jul 2010
Posts: 176

the runmqsc command below has permission :
ls -l /usr/bin/runmqsc
lrwxrwxrwx 1 root system 20 Feb 22 2012 /usr/bin/runmqsc -> /usr/mqm/bin/runmqsc

I tried doing runmqsc using the non mqm user id but got the below error:

sudo -u nonmqmid runmqsc <qmgrName>
Sorry, user nonmqmid is not allowed to execute '/usr/bin/runmqsc <qmgrName>'

Kindly need your guidance on how to proceed with this kind of setup.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri May 23, 2014 2:55 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Read what PaulClarke wrote, including the link he provided.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri May 23, 2014 7:22 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

mqlover wrote:
the runmqsc command below has permission :
ls -l /usr/bin/runmqsc
lrwxrwxrwx 1 root system 20 Feb 22 2012 /usr/bin/runmqsc -> /usr/mqm/bin/runmqsc

I tried doing runmqsc using the non mqm user id but got the below error:

sudo -u nonmqmid runmqsc <qmgrName>
Sorry, user nonmqmid is not allowed to execute '/usr/bin/runmqsc <qmgrName>'

Kindly need your guidance on how to proceed with this kind of setup.

You're forgetting that the link permissions do not reflect the actual permissions.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqlover
PostPosted: Mon May 26, 2014 7:49 pm    Post subject: Reply with quote

Disciple

Joined: 25 Jul 2010
Posts: 176

Thanks for the suggestions.
As mentioned the actual location of runmqsc has the following permission :
ls -l /usr/mqm/bin/runmqsc
-r-sr-s--x 1 mqm mqm 16786 Oct 15 2011 /usr/mqm/bin/runmqsc

Well, As mentioned inn the link shared by PaulClarke, it says to execute chmod +r AMQCLCHL.TAB and chmod +r AMQRSYNA.DAT. Should this be executed as mqm or nonmqmid ?

It currently has the permission :
-rw-rw---- 1 mqm mqm 2042 Feb 22 2012 AMQCLCHL.TAB
-rw-rw---- 1 mqm mqm 9264 Apr 06 20:12 AMQRSYNA.DAT

Anything I do I am not able to execute "runmqsc <qmgrname>" from a nonmqmid.
So need guidance as well.

Thanks in advance
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 27, 2014 4:42 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

possibly because as non mqm id you have execute without read?

The permissions should probably be r-sr-sr-x....
Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General Discussion » runmqsc command without acess for start and stop in unix
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.