Description

This function changes an FTP account's password.

Examples 




https://hostname.example.com:2083/cpsess##########/execute/Ftp/passwd?user=ftpaccount&pass=12345luggage



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Change the FTP account password.
$change_passwd = $cpanel->uapi(
    'Ftp', 'passwd',
    array(
        'user'    => 'ftpaccount',
        'pass'    => '12345luggage',
         )
);

 



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Change the FTP account password.
my $change_passwd = $cpliveapi->uapi(
    'Ftp', 'passwd',
    {
        'user'    => 'ftpaccount',
        'pass'    => '12345luggage',
    }
);

 



<!-- Change the FTP account password. -->
[% execute( 'Ftp', 'passwd', { user => 'ftpaccount', pass => '12345luggage' } ); %]

 



uapi --user=username Ftp passwd user=ftpaccount pass=12345luggage



{  
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{  

   },
   "data":null
}



Parameters

ParameterTypeDescriptionPossible valuesExample
domainstring

The user's associated domain.

This parameter defaults to the cPanel account's primary domain.

We introduced this parameter in cPanel & WHM version 54.


A domain that the cPanel account owns.example.com
userstring

Required

The FTP account username.

The username for an FTP account on the cPanel account.

ftpaccount  
passstring

Required

The FTP account's new password.

A secure password.

12345luggage

Returns

This function returns only metadata.