• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 550
  • Last Modified:

Customized Login Script to Access DirectAdmin

I currently offer hosting solutions to my clients and want them to easily login to their control panel thru my site's main page. I have a reseller account using DirectAdmin instead of CPanel.

How can I pass data sent thru my customized login to DirectAdmin? I have a basic form that asks for the username and password - now I want this passed to DirectAdmin for validation before the client can access his control panel.
0
r31ne
Asked:
r31ne
  • 4
  • 3
1 Solution
 
CosminBCommented:
make the action and the fields of the form be the same as the action of the form from DirectAdmin
something like:
<form action="/CMD_LOGIN" method="post" name="form">
<input type=hidden name=referer value="/">
Username: <input type="text" name="username">
Password: <input type=password name=password>
<input type=submit value='Login'>
</form>

you'll have to change "/CMD_LOGIN" to whatever DirectAdmin uses on your server
0
 
CosminBCommented:
you can find out the action of the DirectAdmin form by going to the DirectAdmin login page and viewing it's source
0
 
r31neAuthor Commented:
CosminB, nothing happened. I mean I used this action:

action="http://my-ip-address:2222/CMD_LOGIN"

and nothing happened. It didn't even processed the form - both in IE and Mozilla.
0
[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

 
CosminBCommented:
what do you mean nothing happend??
0
 
r31neAuthor Commented:
My first try: Nothing happened because the </form> tag came before the submit button. That's my fault.

My second try: Got a 404 error.
0
 
r31neAuthor Commented:
It's my fault why I got a 404 error in my second try. I forgot the referrer field.

Thanks for the replies, CosminB. It's working perfectly now and I accept your answer.
0
 
CosminBCommented:
your welcome
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now