Avamar:無法將使用者變更為根,su 命令失敗並顯示「su:/bin/ksh:No such file or directory"

Summary: 簡短的文章,說明如何處理在 v7.3 中將 root 使用者 shell 更改為未安裝的 shell(在不使用 sudo 的情況下解決問題)。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms



嘗試透過「su -」從管理員使用者提升至根使用者時,命令無法運作,並傳回下列訊息:
"su: /bin/ksh: No such file or directory"

Cause


這是由於 Avamar 的 v7.3 中不存在 korn shell,而 root 帳戶預設為在 /etc/passwd 中使用它。

若要確認,請檢查 root 目前正在使用的 shell。

我們可以使用來自管理員帳戶的 getent 命令來執行此操作(從任何帳戶運行時都可以使用)。

意外回應 (表示問題):
admin@avamar2:/bin/#: getent passwd root
root:x:0:0:root:/root:/bin/ksh

預期回應 (正常輸出):
admin@avamar1:~/>: getent passwd root
root:x:0:0:root:/root:/bin/bash

如我們在上方的輸出結果所見,avamar2 回報 root 使用者已設定為使用 korn shell。這是一個問題,因為 korn shell 在版本 7.3 中不存在。

此問題的根本原因似乎是在安裝 Avamar 後,有人修改了根使用者的 /etc/passwd 項目

Resolution

由於我們無法在 v7.3 中使用 sudo 編輯任何根首選項,我們需要登錄 root 帳戶才能進行更改。因此,我們需要使用 --shell=/bin/bash 標誌和 su 命令來覆蓋 /etc/passwd 指定的預設 shell,並改用 bash shell。

執行下列兩個命令將完成此作業,先存取根帳戶,然後將根帳戶的預設 shell 變更回 /bin/bash。
 
1) su --shell=/bin/bash
2) chsh -s /bin/bash root

Affected Products

Avamar

Products

Avamar, Avamar Server
Article Properties
Article Number: 000063880
Article Type: Solution
Last Modified: 11 Oct 2024
Version:  3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.