• 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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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