In order to automate things, I'm planing to group several commands in one custom page. I have examined the API page, and the forms on the DirectAdmin itself. I get how it works.
I have created a custom class and methods to manage Users, Resellers, etc. I'm having a problem with the CMD_PASSWD/CMD_API_PASSWD (at user level) page/command. It doesn't return a full response. I have tried several combinations:
I get "HTTP/1.1 ", or literally empty response, or a response with headers but no content/body, or sometimes "error=0", or partial body (if the body is html). In short, it is not reliable.
Is this CMD not officially supported? What I like about this CMD is that I can pass parameters such as "system", "ftp", "database". I can assign different passwords to each.
I'm assuming CMD_API_USER_PASSWD changes the password for all three (system, ftp, database). So no control there.
Is there another CMD for this kind of thing that I'm not aware of? Also, what's the problem with this CMD?
I have created a custom class and methods to manage Users, Resellers, etc. I'm having a problem with the CMD_PASSWD/CMD_API_PASSWD (at user level) page/command. It doesn't return a full response. I have tried several combinations:
Code:
POST CMD_API_PASSWD failed login partial/empty response; login page
POST CMD_API_PASSWD incorrect old password partial/empty response
POST CMD_API_PASSWD password change empty body; error=0
// CMD_API_PASSWD works with POST, so switching to CMD_PASSWD
GET CMD_PASSWD failed login login page
GET CMD_PASSWD incorrect old password empty body
GET CMD_PASSWD password change empty body password doesn't change
POST CMD_PASSWD failed login login page/partial response
POST CMD_PASSWD incorrect old password partial/empty response
POST CMD_PASSWD password change empty body; error=0
I get "HTTP/1.1 ", or literally empty response, or a response with headers but no content/body, or sometimes "error=0", or partial body (if the body is html). In short, it is not reliable.
Is this CMD not officially supported? What I like about this CMD is that I can pass parameters such as "system", "ftp", "database". I can assign different passwords to each.
I'm assuming CMD_API_USER_PASSWD changes the password for all three (system, ftp, database). So no control there.
Is there another CMD for this kind of thing that I'm not aware of? Also, what's the problem with this CMD?