Login Management
This section describes the configuration model of login management and provides examples of XML packets.
Data Model
The data model file matching login management is huawei-device.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/huawei-device:device/servers/telnet-server/enabled |
Specifies the Telnet service. |
The value is of the Boolean type:
|
NA |
/huawei-device:device/servers/telnet-server/service-port |
Specifies the port number of the Telnet service. |
The value is an integer in the range from 0 to 65535. The default value is 23. |
NA |
/huawei-device:device/console/uboot/password |
Specifies the BootLoad password of a device. |
The value is a string of 8-80 characters. |
NA |
/huawei-device:set-uboot-password/current-password |
Specifies the current BootLoad password. |
The value must be exactly the same as the current BootLoad password. |
NA |
/huawei-device:set-uboot-password/new-password |
Specifies a new BootLoad password. |
The value is a string of 8-80 characters. |
NA |
Configuring Telnet
This section provides a sample of configuring telnet using the edit-config method.
Operation |
XPATH |
---|---|
edit-config | /huawei-device:device/servers/telnet-server |
Data Requirements
Item |
Data |
Description |
---|---|---|
Telnet service function | true | Enable the Telnet server function. |
Telnet server port number | 23 | Set the Telnet server port number to 23. |
Request Example
<?xml version='1.0' encoding='UTF-8'?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3"> <edit-config> <target> <running/> </target> <config> <dev:device xmlns:dev="urn:huawei:params:xml:ns:yang:huawei-device"> <dev:servers> <dev:telnet-server> <dev:enabled>true</dev:enabled> <dev:service-port>23</dev:service-port> </dev:telnet-server> </dev:servers> </dev:device> </config> </edit-config> </rpc>
Response Example
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0"> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-path>/huawei-device:device/servers/telnet-server/enabled</error-path> <error-message>parse rpc config error.(Invalid value in "enabled" element.).</error-message> </rpc-error> </rpc-reply>