切換認證Switch credentials

本主題說明如何變更系統管理員 (系統管理員) 和簡單的網路管理通訊協定 (SNMP) 所有交換器的認證。This topic shows how to change the administrator (admin) and Simple Network Management Protocol (SNMP) credentials on all switches.

必要條件Prerequisites

執行這些程式之前:Before you run the procedures:

  • 使用遠端桌面連線到 HLH。Use Remote Desktop to connect to the HLH.
  • 在 HLH 上找出 PuTTY,通常是 E:\Tools\Putty\putty.exe。Locate PuTTY on the HLH, usually E:\Tools\Putty\putty.exe. 如果無法使用 PuTTY,請將其下載並複製到 HLH 上。If PuTTY is not available, download and copy it onto the HLH.
  • 請確定您同時擁有交換器的目前和新認證。Make sure you have both the current and new credentials for the switches.

更新系統管理員和啟用帳戶的認證Update credentials for the Admin and Enable accounts

針對縮放單位中的每個交換器 (BMC、TOR1 和 TOR2) :For each switch in the scale unit (BMC, TOR1, and TOR2):

  1. 在 HLH 上,使用 PuTTY,使用目前的認證登入切換。On the HLH, using PuTTY, log in to the switch using the current credentials.

  2. 執行下列命令, <new password> 並以您的新系統管理員取代並啟用認證。Run the following command, replacing <new password> with your new Admin and Enable credentials.

    enable
    configuration terminal
    username admin pass
    word <new_password> privilege 15
    enable password <new_password>
    
  3. 將目前的會話保持開啟狀態。Leave the current session to the switch open.

  4. 在 HLH 上,使用 PuTTY,使用新的認證登入切換。On the HLH, using PuTTY, log in to the switch using the new credentials.

  5. 執行下列命令。Run the following command. [啟用] 不應該提示輸入密碼。Enable should not prompt for a password.

    enable
    write
    dir flash:
    
  6. 確認 startup-config 有今天的日期。Verify the startup-config has today's date.

  7. 確認時,請關閉此會話和原始會話。On confirmation, close both this session and the original session.

更新 SNMP 帳戶Update SNMP accounts

針對縮放單位中的每個交換器 (BMC、TOR1 和 TOR2) :For each switch in the scale unit (BMC, TOR1, and TOR2):

  1. 在 HLH 上,使用 PuTTY 登入切換。On the HLH, using PuTTY, log in to the switch.

  2. 執行下列命令,以取得目前的 SNMP 讀取/寫入使用者和群組:Run the following command to get the current SNMP read/write users and groups:

    enable
    show run snmp | grep user
    

    下列範例會顯示傳回的內容類型,包括使用者、組名和密碼雜湊:The following example shows the type of content that is returned, including user, group name, and password hashes:

    snmp-server user <user> <group> 3 encrypted auth sha <password_hash>
    
  3. 執行下列命令、 <user> 將和取代為 <group> 上一個步驟所決定的詳細資料,並 <password> 以您的新密碼取代:Run the following command, replacing <user> and <group> with the details determined from the previous step, and replacing <password> with your new password:

    configuration terminal
    snmp-server user <user> <group> 3 auth sha <password_new>
    end
    write
    exit
    

後續步驟Next steps

在 Azure Stack Hub 中輪替使用祕密Rotate secrets in Azure Stack Hub