Adding Domain Pointers for Users

donco

Verified User
Joined
Feb 5, 2004
Messages
45
We are doing migrations, and wish to migrate customer domain pointers (domain aliases) automatically.

This requires that the admin login as the customer, then add the domain pointer. It appears this change in login to "admin|customer" is not kept within the page (via a cookie?). Is it possible via a GET or POST to both change to "admin|customer" and add the customer domain pointers?

Thank you for your assistance.
-the donco
 
Hello,

I'm not following the question.. What do you mean by "is not kept within the page". Is it logging you out? What's the problem?

John
 
Is it possible via an API call to DirectAdmin, to add the customer's domain pointers? If so, how?

The rest of the above was simply my attempt at describing how one does it via a web browser in the Admin control panel. Normally, I do it manually, note the steps, then duplicate the process via API calls. However, I was not able to do this, because I'm not able to duplicate in my script the "Login as customer" step, which apparently sets a session cookie.

I hope this provides some measure of clarification. At any rate, what I need to know, is how to add customer domain pointers via an API call (I have my POST syntax, and GET is even easier, I just need to know what needs to be passed to DirectAdmin to do it)

Thanks,
-the donco
 
Last edited:
php class - whether you use this or not, I'm sure it will answer your 'basic auth' questions.

However, if you do use that class, here resides an example that won't be hard to modify to your desired functionality.

:)
 
Allow me to clarify yet again (and this does not necessarily invalidate the above, I simply am not sure).

The issue is not "basic auth" or, as I would say, HTTP authentication. DirectAdmin does not use HTTP authentication, it uses, I believe, cookies.

Again, allow me to refocus the topic. Is it possible for the DirectAdmin administrator, to, via an API call, add a customer domain pointer?

I have attempted many ways of doing this, but have failed in all such attempts.

Thanks all for the attention given to my difficulty thus far,
-the donco
 
At any rate, what I need to know, is how to add customer domain pointers via an API call
..and is that not what I've shown you?

Though, if we want to be correct about things, DA does *not* have an API for manipulating domain pointers. The only way to get around this is to "fake" a POST form and transmit it on over to DA. Since I know you already seem to have figured this, I won't explain any further.

Maybe I'm completely missing your objective, but it seems to me your question is already answered -- simply modify this and it will work.

Good luck. :)
 
And suddenly, he get's it.

Gotcha, just do the primary auth as the "Admin|customer" and proceed as usual.

*ugh*, sometimes it's the obvious that's hard to get, eh?

Thanks so much, as if the above didn't make it abundantly clear, that worked.

Unfortunately the code snippet didn't work, as our PHP didn't like the include. But I used our raw sockets method with the concept you provided, and it worked like a dream.

Thanks again,
-the donco
 
Back
Top