[Info-vax] Need help in REVOKE

Hein RMS van den Heuvel heinvandenheuvel at gmail.com
Tue Feb 12 13:37:10 EST 2013


On Tuesday, February 12, 2013 5:23:47 AM UTC-5, adity... at gmail.com wrote:
> Hi
:
> but how can I revoke all the identifier in a single command. 

I first saw this question appear in an Attunity forum. 
Here is what I answered over there....
-------
This appears to be strictly an OpenVMS question with no direct relationship to Attunity (products).
As such a better place for the (future) questions would have been the comp.os.vms newsgroup, the HP ITRC OpenVMS Forum, or perhaps stackoverflow.com/questions/tagged/openvms.

Still, since you have our attention anyway...

OpenVMS rights are granted and removed one at a time. 
No wildcard support exists.
Best you can do is a quick editor, dcl or perl script to parse AUTHORIZE SHOW [/RIGHTS] information.

Here is an example in perl looking for any identifier starting with "TES".

UAF> grant /ident test_a hein
UAF> grant /ident test_b hein
$ pipe mcr authorize show hein | -
perl -ne "$u=$1 if /me: (\w+)/;print qq(REVOKE/ID $1 $u\n) if /(TES\w*)\s+%X/"
REVOKE/ID TEST_A HEIN
REVOKE/ID TEST_B HEIN

After verifying the rigth output paste that text at the UAF prompt
You can even re-direct to a Authorize, or into a file, check and execute:

$ pipe mcr authorize show hein | -
perl -ne "$u=$1 if /me: (\w+)/;print qq(REVOKE/ID $1 $u\n) if /(TES\w*)\s+%X/" > revoke.tmp
$ type revoke.tmp
...
$ pipe mcr authorize < revoke.tmp

Enjoy!
Hein



More information about the Info-vax mailing list