This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

confd-client.plx - making changes from the command line

Greetings folks.  I'm in a bit of a bind right now.  I'm out of town for the weekend, and I need to get into my Astaro machine.  However, I have limited access to the webadmin to certain networks, thus I can't get to it where I'm at right now.  The only access method I have into my Astaro machine from where I'm at is SSH.  So, I can ssh in, no problem.  I just need to know how to modify access to the webadmin.  I don't have a definition created for the network I'm on right now, so I'm okay opening up the webadmin to the world temporarily (just long enough to do what I need to do).

I'm assuming confd-client.plx is the tool I need, and using that tool I'm looking at the current array values for webadmin/allowed_networks.  However, I just can't figure out how to add a darn value to that array.  Can someone give me the proper command to simply allow all networks access to the webadmin?  I've tried things like the following:

+'REF_NetworkAny'
+2 'REF_NetworkAny'

And so forth.  I'm just not sure what to type.  Thanks.
-joe


This thread was automatically locked due to age.
Parents
  • "cc" is the tool you need to use; there is some online help available in that tool.
  • "cc" is the tool you need to use; there is some online help available in that tool.


    cc is actually just an alias for confd-client.plx.  [:)]  I'm already familiar with that tool, but I can't figure out how to add an item to an array.  In this particular case, I'd like to add the "Any" network definition to the webadmin/allowed_networks array.  I just can't figure out the exact syntax.
    -joe
Reply
  • "cc" is the tool you need to use; there is some online help available in that tool.


    cc is actually just an alias for confd-client.plx.  [:)]  I'm already familiar with that tool, but I can't figure out how to add an item to an array.  In this particular case, I'd like to add the "Any" network definition to the webadmin/allowed_networks array.  I just can't figure out the exact syntax.
    -joe
Children
  • Just so we're on the same page.  You can use the cc command to get and set values from the command line, or you can just run the cc command and use its own interface.  For this example, I just use a straight command line.

    I have sshd set to allow access from anywhere:
    cc get ssh allowed_networks
    ssh->allowed_networks = ["REF_NetworkAny"]


    But webadmin is only allowed access from the internal network:
    cc get webadmin allowed_networks
    webadmin->allowed_networks = ["REF_DefaultInternalNetwork"]


    I simply want to change webadmin's allowed_networks array to be the same as ssh's allowed_networks array.  How can I do that?  I get an error when I try to run the following:

    cc set webadmin allowed_networks ['REF_NetworkAny','REF_DefaultInternalNetwork']
    Bareword "REF_NetworkAny" not allowed while "strict subs" in use at (eval 67) line 1.
    Bareword "REF_DefaultInternalNetwork" not allowed while "strict subs" in use at (eval 67) line 1.


    So I obviously don't have the right syntax, or I'm not using the right names for the network definitions.  That's where I'm stuck.  I've tried single quotes and double quotes, the REF names of the definitions and the common names.  I get the same error no matter what.  If I can just figure this out, and I open up webadmin and get into the gui, then I'm good to go.
    -joe
  • Try
    cc set webadmin allowed_networks "['REF_NetworkAny','REF_DefaultInternalNetwork']"

    or do:
    cc
    webadmin
    allowed_networks@
    REF_NetworkAny

    That should work.

    Kind regards,
    Daniel