Join the Conversation

To sign in, use your existing MySonicWall account. To create a free MySonicWall account click "Register".


Gen 6 API Admin password change


Device: Nsa 2650

Request URL:



    "status": {

        "success": false,

        "cli": {

            "mode": "administration_mode",

            "depth": 2,

            "command": "admin-password old-password password new-password password123 confirm-password password123",

            "configuring": true,

            "pending_config": false,

            "restart_required": "FALSE"


        "info": [


                "level": "error",

                "code": "E_NO_MATCH",

                "message": "No matching command found."





Is their anyway to solve this? It seems API pushes the command 'admin-password' when it should be 'admin password'. Is it possible to use direct/cli to post the command directly to the cli? If so how would this be done?


Category: Developer Hub

Best Answer

  • Options
    JaimeJaime SonicWall Employee
    Answer ✓

    Hello @Gee,

    While we do have a fix coming as I mentioned previously, you have a great point that '/direct/cli' is an available option. Here's how you get that to work:

    POST to /api/sonicos/direct/cli

    Use the following headers:

    Accept: text/plain

    Content-Type: text/plain

    Body (just in plaintext, with a single command per line as shown):


    admin password old-password YOUR_CURRENT_PASSWORD new-password YOUR_NEW_PASSWORD confirm-password YOUR_NEW_PASSWORD


    When you post the command, you should get the following response:

    % Processing request...

    % Status returned processing command:

    admin password old-password MY_OLD_PASSWORD new-password MY_NEW_PASSWORD confirm-password MY_NEW_PASSWORD

    % Changes made.

    Hope that helps.


  • Options
    JaimeJaime SonicWall Employee

    Hi Gee,

    I just tried it out and reproduced the error. I'll report this to our developers. To answer your question, you can use the CLI console or SSH to use the command directly.

    Use the following once logged in:




    <tab> for a list of commands.

    I hope that helps.


  • Options
    JaimeJaime SonicWall Employee

    The fix is currently in development. Please look for this fix in an upcoming Maintenance Release.


  • Options
    GeeGee Newbie ✭

    @Jaime Thank you for the responses.

    Sorry I was not clear enough - I understand how to do the commands manually through CLI.

    The question I'm asking relates to using the direct-cli post method (/direct/cli) which can be found in the swagger UI for firmware.



  • Options
    GeeGee Newbie ✭

    @Jaime Great response. I appreciate it. I will try this out later tonight. Thank you for answering!

Sign In or Register to comment.