Avamar: Unable to change users to root, su command fails with "su: /bin/ksh: No such file or directory"

Summary: Short article explaining how to deal with the root user shell being changed to a not installed shell in v7.3 (resolving the problem without the use of 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



When attempting to elevate from the admin user to the root user via 'su -' the command does not work and returns the following message:
"su: /bin/ksh: No such file or directory"

Cause


This is caused by the korn shell not being present in v7.3 of Avamar, and the root account being set to use it by default in /etc/passwd.

To confirm, check the shell that is currently being used by root.

We can do this with the getent command from the admin account (which works when run from any account).

Unexpected response (indicates an issue):
admin@avamar2:/bin/#: getent passwd root
root:x:0:0:root:/root:/bin/ksh

Expected response (normal output):
admin@avamar1:~/>: getent passwd root
root:x:0:0:root:/root:/bin/bash

As we can see in the outputs above, avamar2 reports that the root user is set to use the korn shell. This is a problem, as the korn shell is not present in version 7.3.

The root cause of the issue appears to have been that the /etc/passwd entry for the root user was modified by someone after Avamar was installed

Resolution

As we are unable to edit any root preferences using sudo in v7.3, we need to log into the root account to make changes. So we need to use the --shell=/bin/bash flag with the su command to override the default shell specified by /etc/passwd and use the bash shell instead.

The following two commands when run will accomplish this, first accessing the root account and then changing the default shell for the root account back to /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.