Novell is now a part of Micro Focus

Tip: Bulk-Loading Photos into eDirectory

Novell Cool Solutions: Tip

Digg This - Slashdot This

Posted: 23 Feb 2005

Here's a tip from Cool Solutions reader Eric Belcher that helps you solve a number of problems associated with adding photos to eDirectory, via eGuide.

Novell TID 10062804 details how to setup NDS and eGuide to use photos. However, adding photos one at a time to eGuide causes a copy of the graphic to be copied to the Tomcat directory. For example, photos could be loaded from \\ebl-003\web3\photos\Staff\ in eGuide and be saved in \\ebl-003\SYS\tomcat\4\webapps\eGuide\Upload\photo\New_Data_Source. So the file 01501.jpg would be saved by eGuide as the filename cn=belce_ou=its_ou=eb_o=acgs.jpg in the Tomcat directory.

The location of the photo file can be found by checking the photo attribute in ConsoleOne under the Other tab.


This presented a number of problems for us:

  1. We have central repository for photos that we need to use.
  2. Saving photos under the Tomcat directory did not suit our cluster situation.
  3. Photo names names are dictated by the employee's payroll number or the student ID.
  4. Using the ICE import utility was not going to be pretty, given the requirements above.


These problems are easily solved - instead of using eGuide to load photos, we used the ICE LFID import to do bulk loads, and manual hex edits for single users. (Yes, the field has to be entered in hex!)

Sample LDIF File

dn: cn=user,ou=admin,ou=users,ou=eb,o=acgs
changetype: modify
replace: photo

The photos need to be available simply by putting the web address into a browser. If this works, eGuide will load the photo from the web address once the information has been ported into eDirectory.


Here is some sample data you can use to build your queries and import files.


SELECT "UserNDS"."NDS_FullName", "UserNDS"."Given Name", "UserNDS"."CN",
"UserNDS"."NDS_Context", "UserNDS"."workforceID"
 FROM   "UserNDS" "UserNDS"
 WHERE   NOT ("UserNDS"."Given Name" LIKE 'Admin%' 
       OR "UserNDS"."Given Name" LIKE 'sn%') 
      AND "UserNDS"."NDS_Context" NOT  LIKE 'its.eb.acgs%' 
      AND  NOT ("UserNDS"."CN" LIKE 'Admin%' 
      OR "UserNDS"."CN" LIKE 'gwuser%' 
      OR "UserNDS"."CN" LIKE 'netback%' 
      OR "UserNDS"."CN" LIKE 'Slade%')

Query Generator

dn: {1@NDSFullFinal}
changetype: modify
replace: photo


NDSFull1 - "cn="+{UserNDS.NDS_FullName}
NDSFull2 - Replace ({@NDSFull1},".",",ou=")
NDSFullFinal - Replace ({@NDSFull2},"ou=myorg","o=myorg")

Crystal Report

To see a sample Crystal Report used to generate the list, click here. Below is a text version of a single entry from the Crystal Report:

dn: cn=andel,ou=admin,ou=myou,ou=mysite,o=myorg
changetype: modify
replace: photo

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates