Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

FTP Change Password api

Discussion in 'cPanel Developers' started by risklife, Dec 16, 2014.

  1. risklife

    risklife Member

    Joined:
    Dec 16, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi, im new in this, i use XMLAPI for get summary account, but now, i need create a change password script, need change a specific account ftp, how i could make this?

    I use this for the summary:
    Code:
    include("xmlapi.php");
    ip = "localhost";
    $root_hash = '';
    $xmlapi = new xmlapi($ip);
    $xmlapi->hash_auth("root",$root_hash);
    $xmlapi->return_xml(1);
    $xmlapi->set_debug(1);
    $username = user;
    $xmlapi->accountsummary($username);
    I try this, but dont work:

    Code:
    include("xmlapi.php"); 
    
    $ip = "localhost"; 
    $root_pass = "root_pass"; 
    
    $xmlapi = new xmlapi($ip); 
    $xmlapi->password_auth("root",$root_pass); 
    
    //$xmlapi->set_debug(1); 
    $args = array( 
        'user' => 'unique@mydomain.tld', 
        'pass' => 'S3cr3t', 
    ); 
    $xmlapi->api2_query('dave','Ftp','passwd',$args);  
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,323
    Likes Received:
    1,851
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    I notice the following line:

    Please update the user entry to "unique" so the @domain suffix is excluded from the entry.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice