Solved

Customized Login Script to Access DirectAdmin

Posted on 2004-04-23
7
529 Views
Last Modified: 2012-06-21
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
Comment
Question by:r31ne
  • 4
  • 3
7 Comments
 
LVL 6

Accepted Solution

by:
CosminB earned 500 total points
ID: 10898169
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
 
LVL 6

Expert Comment

by:CosminB
ID: 10898194
you can find out the action of the DirectAdmin form by going to the DirectAdmin login page and viewing it's source
0
 

Author Comment

by:r31ne
ID: 10898483
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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 6

Expert Comment

by:CosminB
ID: 10898807
what do you mean nothing happend??
0
 

Author Comment

by:r31ne
ID: 10899341
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
 

Author Comment

by:r31ne
ID: 10899682
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
 
LVL 6

Expert Comment

by:CosminB
ID: 10900579
your welcome
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question