< Home

Configuring a Local User

This section describes how to configure a local user using the merge method.

Table 1 Configuring a local user

Operation

XPATH

edit-config:merge

/huawei-user-management/user-management/local-user

Data Requirements

Table 2 Configuring a local user

Item

Data

Description

User name of a local user

huawei123 Set the user name of a local user to huawei123.

Password of a local user

huawei@123

Set the password of a local user to huawei@123.

Level of a local user

15 Set the level of a local user to 15.

Access type of a local user

ftp

Set the access type of a local user to FTP.

Directory that FTP users can access

flash: Set the directory that FTP users can access to flash:.

Maximum number of connections that users can establish.

4294967295 Set the maximum number of connections that users can establish to 4294967295.

Timeout period of the user account.

110 Set the timeout period of the user account to 110 seconds.

State of a local user.

active Set the state of a local user to active.

Expiration time of a local user name

2019-09-21T16:10:21.52Z Set the expiration time of a local user name to 2019-09-21T16:10:21.52Z.

Access permission time range of a local user

time1 Set the access permission time range of a local user to time1.

Type of terminals that allow local users to access the network

ipphone Set the type of terminals that allow local users to access the network to ipphone.

Request Example

<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <hw-user-management:user-management xmlns:hw-user-management="urn:huawei:params:xml:ns:yang:huawei-user-management">
        <hw-user-management:local-user>
          <hw-user-management:user-name>huawei123</hw-user-management:user-name>
          <hw-user-management:privilege-level>15</hw-user-management:privilege-level>
          <hw-user-management:service-type>ftp</hw-user-management:service-type>
          <hw-user-management:password>huawei@123</hw-user-management:password>
          <hw-user-management:ftp-directory>flash:</hw-user-management:ftp-directory>
          <hw-user-management:access-limit>4294967295</hw-user-management:access-limit>
          <hw-user-management:idle-time>110</hw-user-management:idle-time>
          <hw-user-management:state>active</hw-user-management:state>
          <hw-user-management:expire-date>2019-09-21T16:10:21.52Z</hw-user-management:expire-date>
          <hw-user-management:time-range>time1</hw-user-management:time-range>
          <hw-user-management:device-type-group>
           <hw-user-management:device-type>ipphone</hw-user-management:device-type>
          </hw-user-management:device-type-group>
        </hw-user-management:local-user>
      </hw-user-management:user-management>
    </config>
  </edit-config>
</rpc>

Response Example

Sample of successful response

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

Sample of failed response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
 <rpc-error>
  <error-app-tag>-1</error-app-tag>
  <error-message> The password length must range from 8 to 128</error-message>
  <error-info>Error on node /huawei-user-management:user-management/local-user[user-name="huawei123"]/password</error-info>
 </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >