2017年2月14日 星期二

How to reset the lost or forgotten root password in vCenter Server Appliance 6.5

VMware vCenter Server Appliance 6.5最大的改變,就是作業系統運作在VMware自行開發、
優化的新Photon OS v1.0系統上。

如不小心遺忘當初設定root的密碼,在新版Photon OS v1.0系統上要如何重新設置新root密碼?
才能恢復登入Photon OS v1.0系統及VMware vSphere Appliance 6.5 Management管理介面,
來看看VMware官方實際解決方法:KB2147144 說明。
PS.此方法步驟只適用於新vCenter Server Appliance 6.5,並不適用於以前VCSA6.0的版本。

學習主題
1.How to enter the GNU GRUB Edit Menu. 如何進入Photon OS v1.0系統編輯開機選單。
2.Enter the command passwd and provide a new root password. 輸入指令變更密碼。

實作說明
Login VMware vSphere Appliance 6.5 Management unable to authenticate.
開啟瀏覽器,請輸入:https://VCSA FQDN or IP Address:5480
登入帳號:root
登入密碼:
當輸入密碼時,結果輸入老半天就是無法登入、密碼認證失敗。
Account locked due to 6 failed logins 嘗試直接登入系統也失敗....
1.Take a snapshot or backup of the vCenter Server Appliance 6.5 before proceeding. 
   Do not skip this step.
   開啟瀏覽器登入ESXi 6.5a Host Client,請先對VCSA6.5系統快照備份(有備無患不怕改失敗) 
   網址請輸入:https://ESXi Server IP or FQDN/ui
   登入帳號:root
   登入密碼:系統安裝時,所設定輸入密碼。
   Select點選:Navigator導覽器➤Virtual Machines虛擬機器➤VCSA6.5
   ➤Right-click the Snapshots快照Take snapshot建立快照
請點選:Take snapshot建立快照 (請輸入Name快照名稱與Description說明)
2.Reboot the vCenter Server Appliance 6.5.重新啟動VCSA6.5系統
   Select點選:Navigator導覽器➤Virtual Machines虛擬機器➤VCSA6.5
   ➤Right-click the Guest OS客體作業系統➤Restart重新啟動

3.After the OS starts, press "E" key to enter the GNU GRUB Edit Menu.
   系統重新啟動後,按鍵盤按鍵:E進入GNU GRUB開機程式編輯選單。 

4.Locate the line that begins with the word Linux.  找到以Linux一詞開頭行字元
5.Append these entries to the end of the line: 在最後一行空格輸入:
   rw init=/bin/bash    (The line should look like the following screenshot: 如下圖所示 ) 
6.Press F10 to continue booting. 請按F10繼續開機

7.In the Command prompt, enter the command passwd and provide a new root password 
  (twice for confirmation): 在命令提示字元下,輸入指令,提供一個新的root密碼(兩次確認)
   passwd
PS.密碼至少 8 個字元,不超過 20 個字元,至少有1個大寫字元、至少有1個小寫字元
     至少有1個數字、至少有1個特殊字元。

8.Unmount the file system by running this command: 執行指令卸載檔案系統恢復正常開機
   umount /

9.Reboot the vCenter Server Appliance 6.5 by running this command:執行以下指令重新開機
   reboot -f

10.Confirm that you can access the VMware vSphere Appliance 6.5 Management 
    using the new root password
    開啟瀏覽器,登入VMware vSphere Appliance 6.5 Management 管理介面
    請輸入:https://VCSA FQDN or IP Address:5480
    登入帳號:root
    登入密碼:輸入新變更密碼,就可以正常登入系統


11.Remove the snapshot taken in Step 1 if applicable. 
    請記得移除步驟1建立的VCSA6.5快照。

結語
Password it is too simplistic
變更新密碼記得不可以設定得太簡單,會如下圖root密碼變更是不會成功的。
密碼至少 8 個字元,不超過 20 個字元,至少有1個大寫字元、至少有1個小寫字元
至少有1個數字、至少有1個特殊字元。
VCSA6.5 Password must conform to the following:
Password it is too simplistic.密碼設定的太簡單,不符合密碼原則。
Reference 參考資料:KB2147144

沒有留言:

張貼留言