Avamar:无法将用户更改为 root 用户,su 命令失败并显示“su:/bin/ksh:No such file or directory”
Summary: 这篇简短的文章解释了如何处理 root 用户 shell 在 v7.3 中被更改为未安装的 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 后,有人修改了 root 用户的 /etc/passwd 条目
Resolution
由于我们无法在 v7.3 中使用 sudo 编辑任何 root 首选项,因此我们需要登录 root 帐户进行更改。因此,我们需要将 --shell=/bin/bash 标志与 su 命令一起使用,以覆盖 /etc/passwd 指定的默认 shell,并改用 bash shell。
运行以下两个命令将完成此作,首先访问 root 帐户,然后将 root 帐户的默认 shell 更改回 /bin/bash。
运行以下两个命令将完成此作,首先访问 root 帐户,然后将 root 帐户的默认 shell 更改回 /bin/bash。
1) su --shell=/bin/bash
2) chsh -s /bin/bash root
2) chsh -s /bin/bash root
Affected Products
AvamarProducts
Avamar, Avamar ServerArticle 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.