Skip to content
The Chat Archive
gpt-3.5-turbo-0301· OpenAI WildChat-4.8M (AI2)

Explain huawei switch configuration command "local-user admin service-type"

  1. User

    Explain huawei switch configuration command "local-user admin service-type"

  2. 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.

  3. User

    Explain its options

  4. 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:

    1. Telnet: This option allows the local user to access the switch through Telnet service.

    Example: local-user admin service-type telnet

    1. SSH: This option allows the local user to access the switch through SSH service.

    Example: local-user admin service-type ssh

    1. HTTP: This option allows the local user to access the switch through the web management interface(HTTP).

    Example: local-user admin service-type http

    1. 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

    1. SNMP: This option allows the local user to access the switch through SNMP(Simple Network Management Protocol).

    Example: local-user admin service-type snmp

    1. TFTP: This option allows the local user to access the switch through TFTP(Trivial File Transfer Protocol).

    Example: local-user admin service-type tftp

    Overall, 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.

  5. User

    display local-user username admin

  6. 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.

  7. User

    Same command for huawei s series switch

  8. Assistant

    The command to display the details of a local user named "admin" on Huawei S series switch is:

    display local-user username admin
    

    This 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."

  9. User

    What is service type in above?

  10. 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.

  11. User

    How to change service type of local user?

  12. 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:

    1. Enter the configuration mode of the switch:
    Switch# configure terminal
    
    1. Enter the local user view configuration access command:
    Switch(config)# local-user username admin
    

    Note: Replace "admin" with the username for which you want to change the service type.

    1. 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.

    1. Finally, save the configuration:
    Switch(config)# write
    

    The 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.

  13. User

    Change service type such that local user can access the switch through multiple interface

  14. 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:

    1. Enter the configuration mode of the switch:
    Switch# configure terminal
    
    1. Enter the local user view configuration access command:
    Switch(config)# local-user username admin
    

    Note: Replace "admin" with the username for which you want to change the service type.

    1. 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.

    1. 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 HTTPS
    

    Note: Replace "interface-type" and "interface-number" with the correct values for the interface number you want to assign the service type.

    1. Finally, save the configuration:
    Switch(config)# write
    

    The 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.

  15. User

    Delete a local user

  16. 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:

    1. Enter the configuration mode of the switch:
    Switch# configure terminal
    
    1. Enter the local user view configuration access command:
    Switch(config)# local-user username admin
    

    Note: Replace "admin" with the username of the local user you want to delete.

    1. Enter the following command to delete the user:
    Switch(config-local-user)# undo local-user
    
    1. Save the configuration:
    Switch(config)# write
    
    1. Verify the user has been removed from the switch configuration by running the following command:
    Switch# display local-user
    

    The 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.