Unable to login to NSX UI after resetting admin password from CLI.
search cancel

Unable to login to NSX UI after resetting admin password from CLI.

book

Article ID: 384926

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

After resetting the admin password on an NSX Manager node using the following commands:

1.SSH into the NSX Manager node as the root user.
2.Use the 'su admin' command to access the NSX admin command line without requiring a password.
3.Reset the admin password using the below command:

nsx-mgr> set user admin password 

or reset admin password as root user using the below command:

root@nsx-mgr:/# passwd admin

When attempting to log in to the NSX Manager UI after the password reset, you may encounter the following error message:

"Your login attempt was not successful. The username/password combination is incorrect, or the account specified has been locked."

 

Environment

VMware NSX

Cause

Incorrect procedure performed for password reset. 

In order for the password change to take effect a reset_cluster_credentials file needs to be created as per the documented process.
Resetting the Passwords of an Appliance

Resolution

Workaround

Documented process for resetting of passwords needs to be followed as per Resetting the Passwords of an Appliance

The same steps are provided below:

1.Log in to the NSX Manager node using SSH as the root user.

2.Stop the NSX Manager API service
Run the following command to stop the NSX Manager API service:

/etc/init.d/nsx-mp-api-server stop

3.Reset the admin password as you would on any standard Linux system as root:

root@nsx-mgr:/# passwd admin

or as admin run the below command to change the password:

nsx-mgr> set user admin password 

4.Create the reset_cluster_credentials file to trigger the necessary configuration update:

touch /var/vmware/nsx/reset_cluster_credentials

5.Restart the NSX Manager API service to apply the changes:

/etc/init.d/nsx-mp-api-server start


After completing these steps, attempt to log in to the NSX Manager UI again. The login should now be successful.

Additional Information

If they don't know the root password, they can reset it via the GRUB:

  1. Connect to the console of the appliance.
  2. Reboot the system.
  3. When the GRUB boot menu appears, press the left SHIFT or ESC key quickly. If you wait too long and the boot sequence does not pause, you must reboot the system again.
  4. Press e to edit the menu.
    1. Choose the top Ubuntu line then enter the user name root and the GRUB password for root (not the same as the appliance's user root). The default password is NSX@VM!WaR10.
  5. Press e to edit the selected option.
  6. Search for the line starting with linux and add systemd.wants=PasswordRecovery.service to the end of the line.
  7. Press Ctrl-X to boot.
  8. When the log messages stop, enter the new password for root.
  9. Enter the password again.
    1. The boot process continues.
  10. After the reboot, you can verify the password change by logging in as root with the new password.