Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a server running Ubuntu 9.10, openLDAP and phpldapadmin. The latter has the ability to use templates to streamline node creation and I want to use a custom template as described here.

My installation (which was done by apt-get) seems to be located at /usr/share/phpldapadmin/, but instead of containing a templates subdirectory, it contains a symlink to /etc/phpldapadmin/templates. True to form, this directory is locked down. When I break in, I'm greeted with a stark absence of any actual templates, let alone the example.xml file I've been instructed to crib from.

Does anybody know where I ought to place my custom templates? (Bonus points if you can tell me where to find example.xml.)

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I'm an idiot. The permissions were all whack, but the templates were in two subdirectories: creation and modification.

After changing the permissions, it's possible to copy example.xml (or any template) and create new ones.

Be sure to set the permissions on the new file correctly though. Oh, and purge the cache!

share|improve this answer
    
Also, the part of the templates docs that says Don't worry about any other files or subdirectories (like creation or modification) is a foul lie. phpLDAPAdmin, at least 1.2.0.5-2+squeeze1 on Debian 6.0.6, won't read templates in the top level templates/ directory and silently ignores them. –  Craig Ringer Feb 20 '13 at 4:37
    
Also, use xmllint (from libxml2-utils) to check your templates if they're stubbornly failing to appear even after you remove the regexp element, check file permissions, etc. Eg xmllint --dtdvalid template.dtd custom_Staff.xml –  Craig Ringer Feb 20 '13 at 4:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.