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!

dopasswdftp not working

Discussion in 'General Discussion' started by powerclock, Jan 8, 2011.

  1. powerclock

    powerclock Member

    Joined:
    Jan 8, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    51
  2. JeffP.

    JeffP. Well-Known Member

    Joined:
    Sep 28, 2010
    Messages:
    164
    Likes Received:
    15
    Trophy Points:
    68
    Hi powerclock,

    Try this:


    https://example.com:2083/json-api/cpanel?cpanel_jsonapi_version=2&cpanel_jsonapi_module=Ftp&cpanel_jsonapi_func=passwd&user=$USERNAME&pass=$PASSWORD


    You'll need to replace "$USERNAME" with the FTP user's username, and replace "$PASSWORD" with their password. Additionally, this will not work if Security Tokens are enabled on the server (WHM >> Tweak Settings >> Security Tokens).
     
  3. powerclock

    powerclock Member

    Joined:
    Jan 8, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    51
    No luck with that. I don't think I have access to the WHM settings on my host (Hostgator.com). Any other methods?

    Rob

     
  4. powerclock

    powerclock Member

    Joined:
    Jan 8, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    51
    Bump. Any tips to get this working?

    Rob
     
  5. sirdopes

    sirdopes Well-Known Member
    PartnerNOC

    Joined:
    Sep 25, 2007
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    66
    Are you trying to use the cpanel api to change the password or are you just trying to change the password in cpanel? Is this the main cpanel username or a separate ftp account that you created?
     
  6. powerclock

    powerclock Member

    Joined:
    Jan 8, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    51
    I'm trying to change the pwd of a separte ftp account I created (a customers account). Trying to use the API or JSON or hack together a url so I can automate it from within my customer management software. Open to any method that will work.

    I have no problem creating ftp accounts using call such http://mydomain.com:2082/frontend/x3/ftp/doaddftp.html?login=username&password=mypassword

    Its the dopasswdftp bit that isn't working even though it reports success at changing the password.

    Rob
     
  7. powerclock

    powerclock Member

    Joined:
    Jan 8, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    51
    Bump. Anyone?
     
  8. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,544
    Likes Received:
    9
    Trophy Points:
    268
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Are you submitting the form data using POST or only accessing the URL using GET? The "addftp.html" form in cPanel submits data to "doaddftp.html" using POST; I would ensure you're using the same method.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,544
    Likes Received:
    9
    Trophy Points:
    268
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I recommend referring to our documentation for guidance on using the API functions as a more reliable solution for automating tasks; please carefully review the following resources:

    I recommend trying API2 first, which you may call directly or via the XML-API or JSON-API, per the aforementioned documentation resources.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. powerclock

    powerclock Member

    Joined:
    Jan 8, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    51
    Yes, Im submitting it via POST. Cpanel reports success but in fact the password is not changed.
     
  11. powerclock

    powerclock Member

    Joined:
    Jan 8, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    51
    Never mind. Its working using the API2 FTP function.
     
  12. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    5
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    Hello,

    Thats' a good news!! Cheers!
     
    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