Change root password & disable administration panel

Home Forums Conduit: AEP Model Change root password & disable administration panel

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26516
    Stelios Pa
    Participant

    Hello community, I’m trying to secure my gateway before deploying it on site.

    Currently I’m struggling changing my root password and disable the HTTP interface.

    Already tried:

    passwd
    
    curl -k -X PUT -H "Content-Type: application/json" -d '{ "name": "admin", "password": "PASS_HERE", "permission": "admin" }' "https://127.0.0.1/api/users"
    
    curl -k -X PUT -H "Content-Type: application/json" -d '{"http":{"enabled": false, "lan": false, "redirectToHttps": false}, "https":{"enabled": false, "lan": false}}' "https://127.0.0.1/api/remoteAccess"
    

    1) Passwd & Curl seems to work fine but when I reboot the gateway the password is the default again, both for SSH and HTTP.

    2) For the interface:

    HTTP Redirect to HTTPS is disabled and “via LAN” is disabled too.

    But I can access it 🙂

    thanks !

    #26517
    Jason Reiss
    Keymaster

    After changing the settings through the API POST to /api/command/save or /api/command/save_restart for the changes to persist.

    #26518
    Jeff Hatch
    Keymaster

    Stelios,

    Try the following to change the password:

    curl -ik -c cookies -X POST -H ‘Content-Type: application/json’ -d ‘{“username”:”admin”,”password”:”“}’ https:///api/login

    Get the Token.

    curl -ik -c cookies -X PUT -H ‘Content-Type: application/json’ -d ‘{“name” : “admin”, “password” : ““, “newPassword” : ““}’ https:///api/users&token=

    curl -ik -c cookies -X POST -H ‘Content-Type: application/json’ -d ‘{}’ https:///api/command/save_restart&

    When you make changes, make sure to do a save and restart.

    Jeff

    #26525
    Stelios Pa
    Participant

    Thank you both, Jeff your answer solved the problem.

    NEW_PASS='MY_NEW_AWESOME_PASS'
    PASS_TOKEN=$(curl -k -X POST -H "Content-Type: application/json" -d '{"username":"admin","password":"admin"}' https://127.0.0.1/api/login | grep token | awk -F '"' '{print $4}')
    curl -k -X PUT -H "Content-Type: application/json" -d '{"name": "admin", "password": "admin", "newPassword": "'"${NEW_PASS}"'"}' https://127.0.0.1/api/users&token=${PASS_TOKEN}
    • This reply was modified 5 years, 5 months ago by Stelios Pa.
    • This reply was modified 5 years, 5 months ago by Stelios Pa.
    • This reply was modified 5 years, 5 months ago by Stelios Pa.
    • This reply was modified 5 years, 5 months ago by Stelios Pa. Reason: It seems to work now
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.