1

Context

Let's say I have a tree structure with a base node called dc=ACME with an arbitrary and ever-growing number of childs called dc=Foo-XX where XX is a number. Each Foo-XX has two "Organizational Units" inside (ou=groups and ou=users)

So the DN of a given user could be something "Id=4, ou=users, dc=Foo-17, dc=ACME"


Requisite

What I would need is to rename a given "Foo-XX" node, something on the lines of

Foo-XX ->

Foo-XX-removed

keeping also their inner subtrees "functional"; but according to the documentation, ldap_rename isn't able to move not-leaf nodes.

I don't require the full code to do all this, my question is: Does anyone know I library or some directions on how to approach this problem?

Note: If you've used Apache Directory Studio, it would be something like the "Rename Entry..." functionality when you right click a node

xDaizu
  • 1,051
  • 1
  • 12
  • 29
  • 1
    Please note that this site is not a code writing service. If you [edit] your question to describe what you have tried so far and where you are stuck, then we can try to help with specific problems. You should also read [ask]. – Toby Speight Apr 04 '16 at 17:18
  • @TobySpeight I don't really understand you critique. As I explicitely stated I don't want anyone to write the code, just to explain how they would approach the problem: `is it already solved by a library?` `Is there any obscure way to rename a node through another command?` `Do I create a new node a copy every sub node?` – xDaizu Apr 05 '16 at 09:21
  • Your question as it stands is too broad. If you show enough code for where your function sits, then you are more likely to attract good answers for the part that is missing. – Toby Speight Apr 05 '16 at 10:38
  • @TobySpeight Sorry, I appreciate your advice, but I'm really unable to see what code could make the answer better. I mean, the code is gonna be in a Symfony2 service yet that is not actually relevant. It must be implemented en PHP, that's relevant... and stated. There's not much else except the question *"How to rename non-leaf LDAP nodes on PHP?"*. How is that more broad than, I don't know, *"How to change the src of an using jQuery?"* (http://stackoverflow.com/questions/554273/changing-the-image-source-using-jquery) What am I missing? ^^U – xDaizu Apr 05 '16 at 11:48

0 Answers0