NSX Edge Node root password is expired
search cancel

NSX Edge Node root password is expired

book

Article ID: 414062

calendar_today

Updated On:

Products

VMware NSX VMware vSphere ESXi

Issue/Introduction

  • The root password for an NSX Edge is expired.
  • You cannot login to an NSX Edge as the root user.
  • If the expired password is for an NSX Manager, please refer to Root password expired on NSX Manager
  • An NSX Edge Node can be referred to as an ETN.

Environment

  • VMware NSX-T Data Center
  • VMware NSX

Resolution

  • The password for root can be set from the admin login by using the command below. This works if the admin login is accessible and the root password is known.
    set user root password <new-password> old-password <old-password> 
  • If the root password and admin password are unknown for the edge node, to reset the root password of NSX Edge, there are 2 methods, depending on your NSX version:
    • VCF NSX 9.x, use this API call, logged in as root user on one of the NSX managers:
      curl -k -u admin -H 'Content-Type: application/json' -X POST 'https://localhost/api/v1/transport-nodes/<edge-tn-uuid>/node/users/<userid>?action=reset_password'

      With body:
      {
           "password": "<new_password>"
      }
      • The complete API, with examples, would be:
        curl -k -u admin -H 'Content-Type: application/json' -X POST 'https://localhost/api/v1/transport-nodes/12345-12345-12345-12345-12345/node/users/10000?action=reset_password' -d '{"password": "Str0ng_Pwd!Wins$"}'
        • Note: User ID for above API can be found using:
          curl -k -u admin https://localhost/api/v1/transport-nodes/<edge-transport-node-uuid>/node/users
        • Transport node UUID's can be found with:
          curl -k -u admin https://localhost/api/v1/transport-nodes
    • Pre VCF NSX 9.x, to reset the root password of NSX Edge, follow these steps Resetting the Passwords of an Appliance

For further details on resseting the user password with API, please review Reset a user's password without requiring their current password

Additional Information

  • Post resetting the root/admin password via GRUB boot menu or API, the password expiry can be extended from default 90 days to 9999 days, login to the NSX manager as admin via SSH as run below command:
    set user <username> password-expiration 9999
    • For example for root and admin users:
      set user root password-expiration 9999
      set user admin password-expiration 9999
  • Or password expiration can be disabled using the below commands, login to the NSX manager as admin via SSH and run the following commands:
    clear user <username> password-expiration
    • For example for root and admin users:
      clear user root password-expiration
      clear user admin password-expiration

Note: root login via SSH to your appliances may be disabled. This option is set when the appliance is deployed. If you are having issues logging in to your appliance via SSH after resetting the password, ensure that root SSH login is enabled. Optionally, you may log in to the root CLI via the admin console with the command:

st eng

This will prompt you for your root password and drop you to root CLI if successful.

Notes:

  1. The web consoles can have issues with CAPSLOCK.  If you are having issues changing the password, please disable CAPSLOCK and use the SHIFT key as appropriate.
  2. Use a physical keyboard via the VMware Remote Console (VMRC) or a remote support tool to perform root password resets in the GRUB menu. Ensure that the keyboard layout of the accessing machine matches the expected input of the appliance.