Package corrupt after copying with copypol.exe

  • 3086283
  • 03-Nov-2006
  • 26-Apr-2012

Environment


Novell ZENworks 7 Desktop Management
ZDM7 Desktop Management

Situation

After copying a policy to other locations withcopypol.exeor the option in C1 (Utilities|Zenworks|Copy Package) for the second time, all associated policies are gone. If you enable debug-logging for copypol in the ZDM agent (see TID 10093312) you will see an error -672. There was no error with the copypol process and also the CopyPolStatus.txt is not showing an error.

Resolution

The cause of the problem is the user performing the copy having insufficient rights. The copypol.exe that will be available with ZDM7 SP2 or later will check the rigths, abd abort the operation if the rights are not correct before it starts copying.

Additional Information

STEPS TO REPRODUCE:
  1. create a OU called SRC and create a OU called DEST
  2. create a user with all rights on SRC and DEST.
  3. change the trustee of the user on DEST for the attribute zenpolPolicy so that he only has read rights.
  4. enable the login for the zdm agent for copypol (HKLM\Software\Novell\ZENworks\Debug\(DWORD)CopyPol = 3
  5. create a e.g. Workstation Package in SRC and enable e.g. Workstation GroupPolicies and Inventory
  6. use copypol.exe to copy the package from SRC to DEST.
  7. you will recieve a message that the copy is finished. If you look in the C:\Program Files\Novell\Zenworks\DEbugLogs\COPYPOL.LOG you will find a -672 error. If you check the in eDirectory with iMonitor or DSBROWSE the copypolPolicy attribute for the workstation package in DEST, you will see that this points to object in SRC.
  8. perform copypol again from SRC to DEST.
  9. Again you will receive no error.
  10. If you now check C:\Program Files\Novell\Zenworks\DEbugLogs\COPYPOL.LOG you will see that it has deleted the SRC policies.
  11. If you open the package with C1, you will see that all policies, has been deselected