The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

main cpanel login page instead of popup

Discussion in 'General Discussion' started by ryno267, Mar 23, 2004.

  1. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    I'm looking for a way to make the main login to a users cpanel goto a login page/form instead of having the javascript type popup to login...

    thanks
     
  2. BrightAdmin

    BrightAdmin Well-Known Member

    Joined:
    Feb 29, 2004
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I think may be this script will help you in that case:

    <html>
    <script language="javascript">
    <!-- Begin
    function Login(form) {
    var username = form.username.value;
    var password = form.password.value;
    var server = form.server.value;
    if (username && password && server) {
    var cpanel="https://" + username + ":" + password + "@" + server + ":2083";
    window.location = cpanel;
    }
    else {
    alert("Please enter your username and password.");
    }
    }
    // End -->
    </script>
    <body>
    <form name=login>
    <table border=1 cellpadding=3>
    <tr>
    <td colspan=2 align=center>
    <h2>Logon to CPanel! </h2>
    </td>
    </tr>
    <tr>
    <td>Username:</td>
    <td>
    <input type=text name=username size=20 maxlength="26">
    </td>
    </tr>
    <tr>
    <td>Password:</td>
    <td>
    <input type=password name=password size=20>
    </td>
    </tr>
    <tr>
    <td>Your Domain:</td>
    <td>
    <input type=server name=server size=20>
    </td>
    </tr>
    <tr>
    <td colspan=2 align=center>
    <input type=button value="Login!" onClick="Login(this.form)" name="button">
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>


    Put this script in a file and name it as somename.htnl

    Regards,

    Bright:)
     
  3. tsg247

    tsg247 Active Member

    Joined:
    Feb 8, 2004
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Georgia
    Wouldn't the disadvantage to this script be that if the user enters the wrong username or password, then the popup will appear?
     
  4. quasiman

    quasiman Member

    Joined:
    Aug 26, 2003
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Portland, Oregon
    cPanel Access Level:
    Root Administrator
    Well....don't type it wrong! ;)
     
  5. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Trying to bypass security restrictions for account access is just wrong and you do it at your own peril -- and your Clients.

    This has been discussed many times before and people need to understand that security should come before convenience. Using a JS script such as the above, which is not new BTW, is so insecure and it makes it easier for someone to gain unauthorized access.
     
  6. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    Website Rob, please explain. It does not bypass any security measures, just gives a different way to log in. I don't think it is any less secure than cPanel's usual login method.

    That script won't work with the new IE patch, but if it were to post to the :2083/login/ then it would work well:

    <form action="https://yourdomain.com:2083/login/" method=POST>
    Username: <input type=text name=user size=16><BR>
    Password: <input type=password name=pass size=16><BR>
    <input type=submit value="Login"></form>
     
  7. tsg247

    tsg247 Active Member

    Joined:
    Feb 8, 2004
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Georgia
    And, BTW... the current "pop-up" box method is terribly insecure in that you can't really log out of the cpanel or webmail or whm without closing every single browser window to truely "log out!"
     
  8. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    ya.. what he said!!!! :cool:
     
Loading...

Share This Page