< Home

Configuring the Device to Allow Users to Access in Only One Authentication Mode

This section provides a sample of configuring the device to allow users to access in only one authentication mode using the merge method.

Table 1 Configuring the device to allow users to access in only one authentication mode

Operation

XPATH

edit-config:merge

/huawei-nac:nac-access/configure-mode/unified-mode/authentication-profile/single-access

Data Requirements

Table 2 Configuring the device to allow users to access in only one authentication mode

Item

Data

Description

name

p1

Configure the authentication profile named p1.

single-access

true

Configure the device to allow users to access in only one authentication mode.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <hw-nac:nac-access xmlns:hw-nac="urn:huawei:params:xml:ns:yang:huawei-nac">
        <hw-nac:authentication-profile>
          <hw-nac:name>p1</hw-nac:name>
          <hw-nac:single-access>true</hw-nac:single-access>
        </hw-nac:authentication-profile>
      </hw-nac:nac-access>
    </config>
  </edit-config>
</rpc>

Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0">
 <ok/>
</rpc-reply>

Sample of failed response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="7">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-path>/huawei-nac:nac-access/authentication-profile[name='xuan']/single-access</error-path>
    <error-message>parse rpc config error.(Invalid value "we" in "single-access" element.).</error-message>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >