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.

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:
    1
  2. JeffP.

    JeffP. Well-Known Member

    Joined:
    Sep 28, 2010
    Messages:
    164
    Likes Received:
    9
    Trophy Points:
    18
    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:
    1
    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:
    1
    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:
    16
    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:
    1
    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:
    1
    Bump. Anyone?
     
  8. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    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.
     
  9. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    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.
     
  10. powerclock

    powerclock Member

    Joined:
    Jan 8, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    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:
    1
    Never mind. Its working using the API2 FTP function.
     
  12. LinuxTechie

    LinuxTechie Well-Known Member

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

    Thats' a good news!! Cheers!
     
Loading...

Share This Page