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.

Authentication cPanel with public key

Discussion in 'cPanel Developers' started by rdsdesign, Jun 14, 2010.

  1. rdsdesign

    rdsdesign Member

    Joined:
    Mar 4, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Authentication cPanel with root hash

    Hi everyone,

    I would like know if exists somehow to access cPanel with root hash. I don´t found this issue yet, but I believe it´s possible because on the WHM has a link (https://xxx:2087/xfercpanel/login) of accessing without authentication on the cPanel.

    Thanks,

    Ricardo
     
  2. rdsdesign

    rdsdesign Member

    Joined:
    Mar 4, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi Everyone.

    I´m looking for more information about authentication on the cPanel using root public key. Anybody know how can I to do that? I already search in all forum but I don´t found any information for help me. When I list accounts on the WHM and click under cPanel icon I access automaticly the customer cPanel. I need to make exactly that. Can anybody help me?

    Thanks,

    Ricardo
     
  3. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Friendly moderator note

    I moved your original post from the advertising section to the developer section. Since you made a new post that is very similar, I combined the two into a single thread.
     
  4. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Unfortunately, as of this time, the access hash is WHM only. That being said, you can use the access hash w/ the XML-API's cpanel call to perform cpanel API calls.

    e.g. if you wanted to get a list of email accounts available to a user you would execute:

    $ip:2087/xml-api/cpanel?cpanel_xmlapi_module=Email&cpanel_xmlapi_func=listpopswithdisk&user=$username

    This is all authenticated as root, but there is access to cPanel's API.
     
  5. rdsdesign

    rdsdesign Member

    Joined:
    Mar 4, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Test authetication

    Ok. I modified my code. Now, I am using a authentication with user and password of my customer and I need to verify if user and password are correct before accessing cPanel. Is it possible? I wanna use XML API, where can I to find that?
     
  6. myweb

    myweb Well-Known Member

    Joined:
    Jun 18, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Tokyo
  7. rdsdesign

    rdsdesign Member

    Joined:
    Mar 4, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    RE: Test authetication

    This example also don´t work for me. I´m doing a ajax code and I need to verify if user and password are working before acessing cPanel because I´m going to make a treatment.

    Something like:

    $content = file_get_contents('http://'. $ip ':2082/login/?user='. $user . '&pass='. $pass);

    if ($content == 'ok') {
    // authentication
    }
    else {
    // show error
    }

    It´s a simple example. I wanna know if it´s possible. Is it?

    Thanks,

    Ricardo
     
  8. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
  9. rdsdesign

    rdsdesign Member

    Joined:
    Mar 4, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    RE: Test authetication

    Hi Matt.

    Thanks for your assistance. I´m going to create a code that looking for "Login Attempt Failed!" in result. I think that it isn´t a best practice, but I don´t get think another way.

    Thanks again.

    Ricardo
     
Loading...

Share This Page