Author |
Message
|
BBM |
Posted: Mon Feb 13, 2006 12:06 pm Post subject: Is there any way to permission multiple queues quickly? |
|
|
Master
Joined: 10 Nov 2005 Posts: 217 Location: London, UK
|
Hi,
I think I already know the answer to this question but I thought I'd double check.
I have a task to permission approximately 150 queues. Some have a common prefix, some are unique.
I was looking in the manual at wildcards and it seems that you can use * ** to complete queue names in the SETMQAUT syntax.
I was hoping to use "SETMQAUT -m qmgrname -n ** -t q -p username +put +get"
....to give 'username' put and get to all queues. When I run this command against my QM it doesn't seem to permission the queues as I would have expected.
Do I need to specify at least part of the queue name? I guess this is to stop someone inadvertently permissioning SYSTEM queues, but as I have so many unique queue names adding them all to a SETMQAUT script is lots of work. The manual is a little bit vague on ** - as to where you can use it and if you can specify ** alone.
Any suggestions as always gratefully received. |
|
Back to top |
|
 |
csmith28 |
Posted: Mon Feb 13, 2006 12:14 pm Post subject: |
|
|
 Grand Master
Joined: 15 Jul 2003 Posts: 1196 Location: Arizona
|
You already know the answer to this question.
If this is a Unix platform I guess you could writed a script to do it but that may be as big an endeavor as doing it manually. But, if you ever have to do it again. You'll have it scipted.... _________________ Yes, I am an agent of Satan but my duties are largely ceremonial. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Feb 13, 2006 12:41 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
UNIX
Code: |
setmqaut -m QMGR_name_here -n "*.**" -t q -g GroupNameHere +inq
|
WINDOWS
Code: |
setmqaut -m QMGR_name_here -n *.** -t q -p UserNameHere +inq
|
Gives INQ ability to every queue present and future. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
BBM |
Posted: Mon Feb 13, 2006 1:21 pm Post subject: |
|
|
Master
Joined: 10 Nov 2005 Posts: 217 Location: London, UK
|
Wow! - Thanks for the quick response guys.
I guess I need to think a little harder about whether I want permissioning for any queues that may be created in the future.
That's great - food for thought.. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 13, 2006 2:09 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
As well you should not give out permissions to users, but give them out to a group. Then have the users added to the relevant group. No qmgr permissions maintenance on user change. Only OS group maintenance.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
EddieA |
Posted: Mon Feb 13, 2006 2:25 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
but give them out to a group |
Especially on Unix. If you give permissions to a user, then *ALL* the users who share the same primary group are given the same permissions.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
wschutz |
Posted: Tue Feb 14, 2006 6:39 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
csmith28 wrote: |
If this is a Unix platform I guess you could writed a script to do it but that may be as big an endeavor as doing it manually. But, if you ever have to do it again. You'll have it scipted.... |
A script (using ms03) to authorize "phred" to get from all non-SYSTEM queues (on linux):
Code: |
export QM=MyQmgr
./saveqmgr.linux -m$QM -1 -s -c | egrep '^DEFINE QLOCAL|QREMOTE|QMODEL|QALIAS' | awk '{print $3}' | sed -e "s/('\(.*\)')/\1/" | xargs -i -t setmqaut -m $QM -t q -p phred -n {} +get
|
 _________________ -wayne |
|
Back to top |
|
 |
|