Local users are unable to access local or remote Tech Support mode on ESXi 4.1
search cancel

Local users are unable to access local or remote Tech Support mode on ESXi 4.1

book

Article ID: 307374

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
Oct 7 15:55:34 dropbear[208994]: user 'someuser' has invalid shell, rejected
Oct 7 15:57:50 dropbear[209283]: exit after auth (someuser): error changing directory


Environment

VMware ESXi 4.1.x Installable
VMware ESXi 4.1.x Embedded

Resolution

When local users are created via the vSphere client on ESXi 4.1 hosts, the shell value is set to /sbin/nologin shell that prevents login and the home directory is set to a non existant /home/<username> directory this prevents successful logins by local users.
To resolve this issue, create the home directory and change the shell values:
  1. Access the ESXi 4.1 host via Tech Support mode (local or remote) as the root user.
  2. Issue these commands to set the shell to /bin/ash and to create the home directory (replace <username> with the username to be modified).
usermod -s /bin/ash <username>
mkdir -p /home/<username>

chown <username> /home/<username>

Note: To make these changes persistent across reboots, consider setting the user's home directory to a folder residing on a local VMFS volume.


Additional Information

On an ESXi 4.1 system, the /home directory does not exist by default. Using the -p switch to the mkdir command creates the /home directory as well as the user directory beneath it.
To use a home directory different from the default if /home is not a desirable location.
  1. Access the ESXi 4.1 host via Tech Support mode (local or remote) as the root user.
  2. Use a text editor (vi) to edit the /etc/passwd file. Find the line beginning with the username that needs to be modified. Change the /home/<username</SPAN>> entry to the desired home directory.
  3. Run these commands to create the new home directory (replacing <username> with the username to be modified and <homedir> to the desired home directory).
mkdir -p <homedir>
chown <username> <homedir>
Using Tech Support Mode in ESXi 4.1, ESXi 5.x, and ESXi 6.x
Local or Active Directory Domain users on ESX and ESXi 4.1 systems cannot log in