Root account fails to log into vCenter Server Appliance from ssh, but logs in successfully from VAMI and DCUI
search cancel

Root account fails to log into vCenter Server Appliance from ssh, but logs in successfully from VAMI and DCUI

book

Article ID: 412032

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • The root account fails to log into vCenter Server Appliance via SSH with the message: 

    Access denied

  • The root account can log into the VAMI and DCUI with same password.

  • Reviewing vCenter - /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 is incorrect.

Resolution

Before proceeding, take a snapshot or backup of the vCenter Server Appliance.

  1. Access the vCenter's GRUB menu. Refer to steps 1-7 in KB Change or Reset the root account password in vCenter Appliance

  2. Review if the shell was correct.

    cat /etc/passwd | grep root

    Example Output

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

    or

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

  3. Update the shell with correct value

    chsh -s /bin/bash root

    or

    chsh -s /bin/appliancesh root

  4. Confirm if the shell setting has been corrected.

    cat /etc/passwd | grep root


    Example Output

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

  5. Reboot the VCSA

    reboot -f

Additional Information

Change or Reset the root account password in vCenter Appliance
Toggling the vCenter Server Appliance default shell