Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Mar 2008
    Posts
    5

    Unhappy 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. #2
    Member
    Join Date
    Mar 2008
    Posts
    5

    Question Authentication cPanel with public key

    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. #3
    cPanel Staff cPanelJared's Avatar
    Join Date
    Feb 2010
    Location
    Houston, TX
    Posts
    1,066

    Default 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.
    For hands-on assistance, please reference our new support information page: Where should I go for support?
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists(Alt) - Documentation


    -- Jared Ryan, Technical Analyst, cPanel Technical Support

  4. #4
    cPanel Staff cPanelMatt's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    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.
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

  5. #5
    Member
    Join Date
    Mar 2008
    Posts
    5

    Question 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. #6
    Member
    Join Date
    Jun 2002
    Location
    Tokyo
    Posts
    71

    Default

    Quote Originally Posted by rdsdesign View Post
    I wanna use XML API, where can I to find that?
    http://docs.cpanel.net/twiki/bin/vie...ngAPIFunctions

  7. #7
    Member
    Join Date
    Mar 2008
    Posts
    5

    Question 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. #8
    cPanel Staff cPanelMatt's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    The XMLAPI works by taking in HTTP basic auth headers, so a session cookie is not needed (meaning you don't need to hit the login page at all).

    if you were to just do something like what's listed in the "ApiAuthentication" wiki page:

    ApiAuthentication < AllDocumentation/AutomationIntegration < TWiki

    it would probably work.

    or you could use the XML-API class to do this (see api2_example.php)

    http://forums.cpanel.net/f42/xml-api...-a-136449.html
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

  9. #9
    Member
    Join Date
    Mar 2008
    Posts
    5

    Default 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

Similar Threads & Tags
Similar threads

  1. SSH - public key- cpanel - Ubuntu
    By dramos in forum New User Questions
    Replies: 3
    Last Post: 09-29-2010, 02:42 AM
  2. PUBLIC GnuPG key Installation
    By 8p-design in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-28-2009, 02:53 PM
  3. Replies: 1
    Last Post: 03-24-2009, 10:05 PM
  4. SSH access via Public Key Auth for cPanel users - How?
    By jols in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-28-2008, 03:58 AM
  5. gpg: public key not found - how to tell gpg where to find the public key?
    By spaceman in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-06-2006, 07:28 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube