Explain huawei switch configuration command "local-user admin service-type"
- User
Explain huawei switch configuration command "local-user admin service-type"
- Assistant
The Huawei switch configuration command "local-user admin service-type" is used to define the type of service that a local user can access on the switch. The "service-type" parameter specifies the type of service to be allowed, such as Telnet, SSH, or HTTP.
For example, to configure a local user named "admin" with Telnet access only, the command would be:
local-user admin service-type telnet
This command would allow the "admin" user to access the switch through Telnet, but not through other services such as SSH or HTTP.
Overall, this command is used to restrict or allow access to specific services for local users on a Huawei switch.
- User
Explain its options
- Assistant
The "local-user admin service-type" command in Huawei switch configuration has several options that can be used to specify the type of service that a local user can access. The options are as follows:
- Telnet: This option allows the local user to access the switch through Telnet service.
Example:
local-user admin service-type telnet- SSH: This option allows the local user to access the switch through SSH service.
Example:
local-user admin service-type ssh- HTTP: This option allows the local user to access the switch through the web management interface(HTTP).
Example:
local-user admin service-type http- HTTPS: This option allows the local user to access the switch through the secure web management interface(HTTPS).
Example:
local-user admin service-type https- SNMP: This option allows the local user to access the switch through SNMP(Simple Network Management Protocol).
Example:
local-user admin service-type snmp- TFTP: This option allows the local user to access the switch through TFTP(Trivial File Transfer Protocol).
Example:
local-user admin service-type tftpOverall, the "local-user admin service-type" command options are used to specify the type of service that a local user can access on the switch.
- User
display local-user username admin
- Assistant
The "display local-user username admin" command is used in Huawei switch configuration to view the details of a local user named "admin". This command displays the user information, including the user name, privilege level, service type, and password.
Here is an example output of the "display local-user username admin" command:
<SwitchA>display local-user username admin ------------------------------------------------------------------------------- User-name : admin Password : cipher $1$P5Ab3vXL$F9cBvVWPeJN5cNYbJXIKk0 Access-type: telnet + ssh + http + https + snmp + ftp + sftp Service-type: terminal-service user-interface Privilege : 15 -------------------------------------------------------------------------------In this example, the output indicates that the "admin" user has a password encrypted with a cipher, and service types include telnet, SSH, HTTP, SNMP, user interface and has a privilege level of 15.
Overall, the "display local-user username admin" command is used to view the configuration details of a local user on the Huawei switch.
- User
Same command for huawei s series switch
- Assistant
The command to display the details of a local user named "admin" on Huawei S series switch is:
display local-user username adminThis command is used in the privileged mode of the switch to view the local user's privileges and service types.
Here is an example output of the "display local-user username admin" command on a Huawei S series switch:
<SwitchA>display local-user username admin ------------------------------------------------------------------------------- User name : admin Password : cipher $1$P5Ab3vXL$F9cBvVWPeJN5cNYbJXIKk0 Service Type: telnet+ssh+terminal+ Level : 15 -------------------------------------------------------------------------------In this example, we can see that the "admin" user has access to Telnet, SSH, and terminal services and has a privilege level of 15. The password for the user is also displayed encrypted with a cipher.
Overall, the "display local-user username admin" command is used in Huawei S series switches to view the details of a local user named "admin."
- User
What is service type in above?
- Assistant
In the output of the command "display local-user username admin" on a Huawei S series switch, the "Service Type" field refers to the types of services for which the local user "admin" is authorized.
In the example output provided above, the "Service Type" field specifies the following service types:
- Telnet
- SSH
- Terminal
This means that the local user "admin" can access the switch through Telnet, SSH, and the terminal interface.
Overall, the "Service Type" field in the output of "display local-user username admin" command indicates the types of services that the local user can access on the switch.
- User
How to change service type of local user?
- Assistant
To change the service type of a local user on a Huawei switch, you need to use the "local-user" command in the configuration mode of the switch. Here are the steps to change the service type:
- Enter the configuration mode of the switch:
Switch# configure terminal- Enter the local user view configuration access command:
Switch(config)# local-user username adminNote: Replace "admin" with the username for which you want to change the service type.
- Enter the service-type command to set the new service type:
Switch(config-local-user)# service-type {telnet | ssh | http | https | snmp | ftp | sftp | web | dhcp }Note: Replace {telnet | ssh | http | https | snmp | ftp | sftp | web | dhcp } with the desired service-type that you want to assign to the user.
- Finally, save the configuration:
Switch(config)# writeThe above steps will update the service-type of the local user.
Overall, using the "local-user" command along with the "service-type" parameter in the configuration mode of the Huawei switch allows you to change the service type of a local user.
- User
Change service type such that local user can access the switch through multiple interface
- Assistant
To change the service type of a local user on a Huawei switch so that the user can access the switch through multiple interfaces, you need to assign the service type to all the relevant interfaces using the "user-interface" command. Here are the steps to change the service type:
- Enter the configuration mode of the switch:
Switch# configure terminal- Enter the local user view configuration access command:
Switch(config)# local-user username adminNote: Replace "admin" with the username for which you want to change the service type.
- Enter the service-type command to set the new service type:
Switch(config-local-user)# service-type {telnet | ssh | http | https | snmp | ftp | sftp | web | dhcp }Note: Replace {telnet | ssh | http | https | snmp | ftp | sftp | web | dhcp } with the desired service-type that you want to assign to the user.
- Enter the user-interface configuration command for each interface that you want to assign the service type:
Switch(config)# interface interface-type interface-number Switch(config-if)# user-interface vty 0 4 // For Telnet and SSH Switch(config-if)# user-interface http // For HTTP and HTTPSNote: Replace "interface-type" and "interface-number" with the correct values for the interface number you want to assign the service type.
- Finally, save the configuration:
Switch(config)# writeThe above steps will update the service-type of the local user to be able to access the switch through multiple interfaces.
Overall, using the "user-interface" command along with the "service-type" parameter in the configuration mode of the Huawei switch allows you to change the service type of a local user and assign the service type to multiple interfaces.
- User
Delete a local user
- Assistant
To delete a local user in Huawei switch configuration, you need to use the "undo local-user" command in the configuration mode of the switch. Here are the steps to delete a local user:
- Enter the configuration mode of the switch:
Switch# configure terminal- Enter the local user view configuration access command:
Switch(config)# local-user username adminNote: Replace "admin" with the username of the local user you want to delete.
- Enter the following command to delete the user:
Switch(config-local-user)# undo local-user- Save the configuration:
Switch(config)# write- Verify the user has been removed from the switch configuration by running the following command:
Switch# display local-userThe above steps will delete the local user from the Huawei switch configuration.
Overall, using the "undo local-user" command in the configuration mode of the Huawei switch allows you to delete a local user.