Dsmobj

PHP/LDAP Script to make the same change to multiple objects with the same name.

This php script is somewhat high risk with plenty of potential for creating chaos! Its primarily intended for manipulating Zen for Desktops objects in a large tree which has many basically similar App objects but which doesn't use Zen for Servers to replicate them. Thus its application may be limited. It can potentially be used against any LDAP directory and any type of object though.

Its got a few bells and whistles for ZEN, notably a way of embedding the object's context in the attribute value, which is handy for setting up chained applications, and its also good for setting identical GUIDs for all app objects with the same name for load balancing and so on. If you find yourself cutting and pasting the same attribute value into lots of app objects by hand it may well come in useful. It probably needs a few more screen hints on usage.

There are 4 scripts which make up this application. This is a little clumsy, and they could probably be combined with appropriate coding, but life's too short...

dsmobjedit.php is the main script where the details of the proposed changes are filled in and so on.

dsmobjlist.php is called from dsmobjedit makes no changes. It lists every attribute of the first object found which matches the chosen CN. Its intended to enable the user to get a feel for the data and the LDAP attribute names.

dsmobjrun.php is provided to give confirmation of the proposed changes. It lists every object that will be changed and the changes that will be made, and then asks for confirmation in no uncertain terms!

dsmobjchange.php is called by dsmobjlist and actully makes the changes.

Change History

  1. 17 November 2008 - Initial public release.
  2. 12 February 2009 - Added code for php5 etc systems that don't support the deprecated http_post_vars predefined variable.
  3. 21 May 2009 - Performance enhancement.
  4. 24 Jan 2010 - Minor html syntax corrections in dsmobjedit and dsmobjchange

Download

Download zip archive


These snippets and utilities are licensed under the University of Illinois/NCSA Open Source License. Here is the text of the license as it applies to this code.

To contact the writer please use this form, or if you prefer use Linked In or even Facebook.

HTML check . CSS check

© Jim Champ, last edit