IBM Support

Change ownership of all objects in a VOB using the find command

Question & Answer


Question

How can I change the ownership of all objects in an IBM Rational ClearCase VOB (including UCM Component and/or Project VOBs) on Microsoft® Windows, UNIX and Linux using the, cleartool find, command?

Answer

When a VOB's ownership is changed it is often desirable to change the ownership of the elements and metadata in the VOB. You can use the cleartool find command in conjunction with the protect command to reprotect the objects in the VOB.

Notes:

  • These directions are applicable for use in UCM and Base ClearCase when working in an AdminVOB and Child VOB configuration.

  • The vob_sidwalk command can also be run to accomplish the same goal. Review technote 1256390 for more details.


Example:

The following commands will change the owner and group for all the metadata and elements in a PVOB or Component VOB on UNIX.

Note: The individual commands below must be run in each of the VOBs needing reprotection.


1. To change the owner and group of every type object in a VOB:

  • Set into a view with a default config_spec.
  • Set to the VOB tag.
  • Execute the following find command:

    UNIX and Linux:

    cleartool find . -kind all -exec 'cleartool protect -chown NEWUSER -chgrp NEWGROUP $CLEARCASE_PN'

    Windows:

    cleartool find . -kind all -exec "cleartool protect -chown NEWUSER -chgrp \"RATIONAL\Domain Users\" \"%CLEARCASE_PN%\""

    Note: The -kind option is present in 2003.06.00 and can be used, but is undocumented. This option is documented in 7.0 or later.

    The usage of -kind is:

    -kind { object_selector | all }


2. To change the owner and group of all the elements in a VOB:
  • Set into a view with a default config_spec.
  • Set to the VOB tag.
  • Execute the following find command:

    UNIX and Linux:

    cleartool find . -all -exec 'cleartool protect -chown NEWUSER -chgrp NEWGROUP $CLEARCASE_PN'

    Windows:

    cleartool find . -all -exec "cleartool protect -chown NEWUSER -chgrp \"RATIONAL\Domain Users\" \"%CLEARCASE_PN%\""

For more information on any of the cleartool sub-commands used in this technote refer to IBM Rational ClearCase Command Reference, or run cleartool man <sub-commands>.

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"VOB","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF015","label":"IRIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"2003.06.16;7.0;7.0.1;7.1;7.1.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"VOB","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Permissions","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21146517