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.

cPanel URL login

Discussion in 'General Discussion' started by trumpetblast, Apr 15, 2010.

  1. trumpetblast

    trumpetblast Registered

    Joined:
    Apr 15, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Everything I've found on the web says that you should be able to login to cPanel automatically via a URL that looks like this:

    http://DOMAINNAME:2082/login/?user=YOURUSERNAME&pass=YOURPASSWORD

    However, this is not working for me. I just get the login page with "Login Attempt Failed!" in red text.

    Any ideas on how to fix this? Any alternative url structures? Or perhaps there's some setting in cPanel/WHM that needs to be changed to allow for this?
     
  2. trumpetblast

    trumpetblast Registered

    Joined:
    Apr 15, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    OK let me elaborate.

    We are on a VPS. I spoke with HostGator support and they have the same problem, cannot login by using a URL in the above-mentioned format. However, such a format works just fine on their shared hosting.

    The tech told me there must be some switch to flip somewhere that will allow this to work, but he had no idea where.

    I've been looking around in our WHM, specifically in Security section of Tweak Settings. However, I've yet to find anything that resolves this problem.

    Any ideas?
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,455
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  4. kristin_110

    kristin_110 Registered

    Joined:
    Apr 16, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I am having similar issues. Any help would be appreciated.
     
  5. trumpetblast

    trumpetblast Registered

    Joined:
    Apr 15, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Yes, these links work just fine for me.
     
  6. trumpetblast

    trumpetblast Registered

    Joined:
    Apr 15, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Good God, this really should not have been so difficult to resolve. But finally I have, so here's the answer for the benefit of future fellow hair-puller-outters:

    If the URL format mentioned above doesn't work for you, try making a form and posting the required information to the URL instead.

    I could swear that I tried this at one point and it didn't work, but it does work now, so no complaints.

    There's a rather thorough example in PHP here: SampleBrandedLogin < AllDocumentation < TWiki

    The following, however, is my somewhat simplified version, which will work for logging into cPanel (2082) only:

    Code:
    <?php
        $href = 'example.com:2082/login/';
        echo "<form action=\"$href\" method=\"POST\"";
        echo "<input type=\"hidden\" name=\"user\" value=\"$user\"";
        echo "<input type=\"hidden\" name=\"pass\" value=\"$pass\"";
        echo "<input type=\"hidden\" name=\"failurl\" value=\"$href\"";
        echo "<input type=\"hidden\" name=\"login_theme\" value=\"default\"";
        echo "<input type=\"submit\" value=\"Login\"";
    ?>
    Since I already know the user's username & password, no need to ask them for it, I just pass it in variables.

    Hope this helps someone.
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,455
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
Loading...

Share This Page