Root account failed to login vCenter Server Appliance from ssh, but successful login from VAMI and DCUI
search cancel

Root account failed to login vCenter Server Appliance from ssh, but successful login from VAMI and DCUI

book

Article ID: 412032

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • The root account was failed to login vCenter Server Appliance with ssh. "Access denied" was reported.
  • The root account could login from VAMI and DCUI with same password.
  • If the vCenter log bundle was collected. It's found that the root shell "does not exist" in the sshinfo.log.

--/var/log/audit/sshinfo.log
YEAR-MONTH-DATE:TIME:XX.XXXXXX+00:00 <vCenter name>: User root not allowed because shell /bin/bbash does not exist

Cause

The current shell setting of root account was incorrect.

Resolution

1.Take a snapshot or backup of the vCenter Server Appliance before proceeding.

2.Login the VCSA from console, without the password.

  Refer the procedure in KB322247, Resetting root password in vCenter Server Appliance 6.5 / 6.7 / 7.x / 8.x

  Implement step 1 to step 7 in "Process to Reset the Root Password in vCenter Server Appliance(VCSA)".

3.Check current shell setting, confirm if the shell was correct.

# cat /etc/passwd | grep root

root:x:0:0:root:/root:/bin/bbash

4.Update the shell with correct value

# chsh -s /bin/bash root
or
# chsh -s /bin/appliancesh root

5.Check current shell setting to confirm it had been corrected.

# cat /etc/passwd | grep root

root:x:0:0:root:/root:/bin/bash

6.Reboot the VCSA

# reboot -f

Additional Information

Resetting root password in vCenter Server Appliance 6.5 / 6.7 / 7.x / 8.x
https://knowledge.broadcom.com/external/article/322247/

Toggling the vCenter Server Appliance default shell
https://knowledge.broadcom.com/external/article/319670/