ldapmodify invalid format error

Posted on 2005-04-26
Last Modified: 2013-12-26

I have two servers;

FreeBSD 4.8-RELEASE-p4

Linux 2.6.11-hardened-r1 (Gentoo)

I'm attempting to load a jpeg picture into Active Directory with the following commands.

# /usr/bin/ldapmodify -h sql-direct -x -D "domainname\\administrator" -W
Enter LDAP Password:
dn: CN=Marianne Sharp,OU=Users,OU=Standard,OU=Resources,DC=domainname,DC=com
changetype: modify
add: jpegPhoto
jpegPhoto:< http://goose/images/staff/msharp.jpg

Attempted first on Server2.  It gives me the following error message;

ldapmodify: invalid format (line 4) entry: "CN=Marianne Sharp,OU=Users,OU=Standard,OU=Resources,DC=silverbrookresearch,DC=com"

Attempt on Server1 loads the picture without error.
Anyone have any ideas on what the problem could be?

Question by:Silverbrook
    LVL 38

    Accepted Solution

    In your Linux box (server2), did you compile OpenLDAP with fetch support?
    Otherwise, only "file://" URLs are supported.

    If you don't want to re-compile OpenLDAP, you can download the jpeg file to server2, and
    use "file://" to add the image.

    also have a look at:

    Author Comment

    I have now tried running 'configure --with-fetch' but it say

    checking fetch(3) library... no
    configure: error: no suitable API for --with-fetch=yes

    The libfetch library is standard on FreeBSD, but is it ported to Linux? Can you point me to a package? On FreeBSD fetch(1) uses it, but on Gentoo Linux fetch(1) uses the http-fetcher library. I'm not sure about what other Linux distros use. Openldap fails to recognise http-fetcher.
    LVL 38

    Expert Comment

    You do need to install the libfetch library to make it to work. Sorry I don't use "Gentoo Linux "
    can't tell you where to download it, but you can do a search on the web, or have a look at
    your Linux CD to get it install.

    PS: The guys wrote the tutorial was having the same trouble as you. in the worst case, you can use the work around solution. download the file to your box, and point to the file.

    also have a look at:;page=1

    Author Comment

    I already googled it, and checked the Gentoo distro before the previous comment. Everything I have found suggests that there is no libfetch for Linux. We can work around it by using file:// URLs in this case. Thanks for your help.
    LVL 38

    Expert Comment

    You are welcome!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now