Skip to main content
rimeda201
Apprentice
September 18, 2025
Question

Custom Platform Huawei

  • September 18, 2025
  • 8 replies
  • 264 views

Hi, does anyone have a Huawei Switch/Router custom platform for Password Safe to share with us?

8 replies

frank.colvin
Veteran
September 18, 2025

I hope this helps. not really tested.

Steps to Create a Custom Platform for Huawei Devices

1. Access the Custom Platforms Page

  • In the BeyondInsight Console, go to:
    Configuration > Privileged Access Management > Custom Platforms
  • Click Create New Custom Platform or Clone an existing one (e.g., Cisco or Linux) to modify.

2. Configure the Options Tab

  • Platform Name: Give it a unique name (e.g., Huawei SSH Router).
  • Protocol: Choose SSH or Telnet, depending on how your Huawei device is accessed.
  • Port: Default is 22 for SSH or 23 for Telnet.
  • Prompt Regex: Define the shell prompt regex (e.g., > or # depending on Huawei CLI).
  • Config Prompt / Elevated Prompt Regex: Useful for devices with multiple modes (e.g., user vs. system view).
  • End of Line: Usually \r (carriage return).
  • Password Command: The CLI command used to change passwords (e.g., set password or user-interface vty commands).
  • Exit Command: Typically quit or exit.

3. Define Steps for Password Change

  • On the Steps tab, define:
    • Expect statements: What the device sends back (e.g., login prompts, confirmation messages).
    • Response statements: What Password Safe should send (e.g., username, password, CLI commands).
  • Use template variables like <<MANACCTNAME>> and <<NEWPASSWORD>> to dynamically insert credentials.

4. Check/Change Password Tab

  • Configure how Password Safe tests and changes passwords.
  • Specify:
    • Host IP
    • Functional Account
    • Managed Account
    • Elevation Command (if needed, e.g., sudo or Huawei-specific privilege escalation)

5. Test and Activate

  • Use the Check Password and Change Password buttons to validate the setup.
  • Once successful, go back to the Options tab, check Active, and click Create Platform.

🧩 Optional: Use Custom Plugins

If Huawei’s CLI is highly customized or uses APIs, you can extend Password Safe using the Custom Plugin SDK.

 

Here’s a sample Huawei CLI session and corresponding regex patterns you can use to build a custom platform in BeyondTrust Password Safe for Huawei switches or routers.

 Sample Huawei CLI Session

 

Plain Text

Login authentication

 

Username: admin

Password:

 

<Huawei> system-view

Enter system view, return user view with Ctrl+Z.

 

[Huawei] user-interface vty 0 4

[Huawei-ui-vty0-4] authentication-mode aaa

[Huawei-ui-vty0-4] set authentication password cipher NewP@ssw0rd

[Huawei-ui-vty0-4] quit

[Huawei] save

Are you sure to save the configuration? (y/n)[n]: y

Configuration is saved.

[Huawei] quit

<Huawei> quit

 

Show more lines

Regex Patterns for Custom Platform

These regex patterns help Password Safe detect prompts and transitions:

Purpose Regex Pattern Notes
Login Prompt Username: Detects username prompt
Password Prompt (?i)Password: Case-insensitive match for password prompt
User View Prompt <[^>]+> Matches <Huawei> or similar
System View Prompt \[[^\]]+\] Matches [Huawei] or [Huawei-ui-vty0-4]
Confirmation Prompt Are you sure.*\? \(y/n\)\[n\]: For save confirmation
Command Success Configuration is saved\. Confirms save completed

🛠️ Password Change Command Template

You can script the password change steps like this:

  1. system-view
  2. user-interface vty 0 4
  3. authentication-mode aaa
  4. set authentication password cipher <<NEWPASSWORD>>
  5. quit
  6. save
  7. Confirm with y
  8. quit (twice)

once again this is not tested 

Frank Colvin, Senior IT Administrator - PAM Intact Insurance Specialty Solutions
Apprentice
September 19, 2025

Failing at my first beekepers post :D

frank.colvin
Veteran
September 19, 2025

These are general 

 

Frank Colvin, Senior IT Administrator - PAM Intact Insurance Specialty Solutions
Apprentice
September 19, 2025

Hi, does anyone have a Huawei Switch/Router custom platform for Password Safe to share with us?

I have some. Which Huawei device & firmware?

Some of the old ones are quite clunky cli wise

frank.colvin
Veteran
September 19, 2025

you have some what?

 

Frank Colvin, Senior IT Administrator - PAM Intact Insurance Specialty Solutions
Apprentice
September 19, 2025

Lab tested ‘Custom Platforms’ for a variety of Huawei devices.

Just wondering if any would assist the OP

frank.colvin
Veteran
September 19, 2025

would not hurt to try any of yours switch.routers?

 

Frank Colvin, Senior IT Administrator - PAM Intact Insurance Specialty Solutions
syedraahimali
Rising Star
January 27, 2026

Lab tested ‘Custom Platforms’ for a variety of Huawei devices.

Just wondering if any would assist the OP

Hi ​@balldred 

I have a use case to test on an H3C switch and I saw above that the password change methodology in Huawei is almost similar to H3C.

 

Can you share with me please?