Announcement

Collapse
No announcement yet.

XML Import Question

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • XML Import Question

    I have adapted the xmlConfig.c file to allow a user to change the network settings of the Xport Pro. I have also used the same xml Import to add user accounts.

    My question is there a way to delete user accounts via xml import or some other method?

    I have seen a configitem name "user delete" but I am not sure how to use it.

  • #2
    Yes, you can delete with XML import. Use the Group Item "authorized user delete" and the value is the name of the user.

    Or you can use the Group Item "delete authorized users" with no value and that will delete all users.

    See page 29 of the Command Reference:
    http://www.lantronix.com/pdf/XPort-Pro_CR.pdf

    Comment


    • #3
      I have attempted to import the following config group into my xml, followed by a reboot.

      <configgroup name = "http authentication ur\" instance = "/">
      <configitem name = "delete authorized users">
      </configitem>
      <configitem name = "realm">
      <value>/</value>
      </configitem>
      <configitem name = "type">
      <value>None</value>
      </configitem>
      </configgroup>

      The result of the import is that password protection has been disabled but when I navigate to the HTTP Authentication page of the XPort Pro config all of my users still appear.

      Thank you for your assistance

      Comment


      • #4
        Oh, I thought you were looking for ssh users. For http users, see page 22 of the Command Reference. The Group Item name is "user delete" and the value name is the name of the user.

        Comment


        • #5
          Please forgive my previous typo...here is my xml snippet

          <configgroup name = "http authentication uri" instance = "/">
          <configitem name = "delete authorized users">
          </configitem>
          <configitem name = "realm">
          <value>/</value>
          </configitem>
          <configitem name = "type">
          <value>None</value>
          </configitem>
          </configgroup>

          Comment


          • #6
            Understood...that was the method I was attempting to use before

            Here is my updated code snippet

            <configgroup name = \"http authentication uri" instance = "/">
            <configitem name = "user delete">
            <value>"admin"</value>
            </configitem>
            <configitem name = "realm">
            <value>/</value>
            </configitem>
            <configitem name = "type">
            <value>None</value>
            </configitem>
            </configgroup>

            Unfortunately I am still getting the same results. I have attempted to place the user admin without quotes as well.

            Comment


            • #7
              I just tried this and it worked:

              <configrecord version = "0.1.0.0T0">
              <configgroup name = "http authentication uri" instance = "/debug">
              <configitem name = "user delete">
              <value name = "name">test</value>
              </configitem>
              </configgroup>
              </configrecord>

              That deletes the user test from the /debug URI instance.

              If this still doesn't work, please post what the error message you're getting is.

              Mariano

              Comment

              Working...
              X