Loading

×Sorry to interrupt
Uncaught ReferenceError: addCTracking is not defined
throws at https://kb.vmware.com/resource/KM_TealiumTrackingJS?v=0.5:100:1

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

Reset 'admin' and/or CLI Privilege Mode passwords for NSX Manager, NSX for vSphere 6.3 & 6.4 (60335)

Last Updated: 10/6/2022Categories: How toTotal Views: 11812Language:
English

1 like this article

Subscribe to get an email
newsletter with new updates

1 people found this helpful Please provide article feedback:

Symptoms

The passwords to the 'admin' account and/or the CLI Privilege Mode have been lost, forgotten, or are otherwise unrecoverable.
There are no other CLI users defined for this NSX Manager, or the CLI Privilege Mode password has also been lost, forgotten, or is otherwise unrecoverable.

Purpose

The purpose of this article is to detail the steps necessary to recover access to the NSX Manager without having to resort to a redeployment of the NSX Manager appliance.

Impact / Risks

The NSX Manager will need to be taken offline for several minutes while the passwords are reset.

Resolution

To reset the password for the 'admin' account and/or the CLI Privilege Mode, use the following steps.

Power off the NSX Manager appliance

Edit the virtual machine settings and mount a Linux-based LiveCD ISO to the virtual CD/DVD drive, and configure it to Connect At Power On

Under VM Options > Boot Options ensure that the option Force BIOS setup is selected

Power on the NSX Manager appliance

In the BIOS, under the Boot menu, ensure that the CD-ROM Drive is listed above the Hard Drive

Exit the BIOS, saving changes

Once your LiveCD has booted into a desktop environment, open a Terminal (command line) and switch to the 'root' account

To reset the 'admin' password:

Create a directory to mount the appliance root partition:
# mkdir /mnt/sda2

Mount the appliance root partition:
# mount /dev/sda2 /mnt/sda2

Create a backup of the shadow file:
# cp /mnt/sda2/etc/shadow /mnt/sda2/etc/shadow.backup

Make the shadow file writable:
# chmod u+w /mnt/sda2/etc/shadow

Generate a new password hash (in this example, the new password is VMware123!):
# perl -e '$salt = `tr -dc "a-z0-9A-Z" < /dev/urandom | dd bs=1 count=8 2>/dev/null`; $crypt_passwd = crypt("VMware123!", "\$6\$$salt\$\\"); print $crypt_passwd . "\n"'

Edit the shadow file and replace the password hash for the 'admin' account with the generated hash from Step 5

Save your changes and exit the editor

Remove the write permission for the shadow file:
# chmod u-w /mnt/sda2/etc/shadow

To reset the CLI Privilege Mode password:

Create a directory to mount the appliance common partition:
# mkdir /mnt/sda6

Mount the appliance common partition:
# mount /dev/sda6 /mnt/sda6

Create a backup of the passwd file:
# cp /mnt/sda6/configs/cli/etc/passwd /mnt/sda6/configs/cli/etc/passwd.backup

Generate a new password hash (in this example, the new password is VMware123!):
# perl -e '$salt = `tr -dc "a-z0-9A-Z" < /dev/urandom | dd bs=1 count=8 2>/dev/null`; $crypt_passwd = crypt("VMware123!", "\$6\$$salt\$\\"); print $crypt_passwd . "\n"'

Edit the passwd file and replace the password hash for the 'admin' account with the generated hash from Step 4

Save your changes and exit the editor

Power off the NSX Manager appliance

Edit the virtual machine settings and un-mount the Linux-based LiveCD ISO from the virtual CD/DVD drive.

If you want to revert back to the default boot order, under VM Options > Boot Options ensure that the option Force BIOS setup is selected

Power on the NSX Manager appliance

Verify the new passwords by logging into the console of the NSX Manager with the 'admin' account, and then use the enable command to switch to the CLI Privilege Mode.

Note: If you are still unable to access the CLI mode after the change above and received authentication failed message. You may also need to perform all the steps in section 8 for partition /dev/sda3 if there was an upgrade at some point.

If you are unable to access CLI Privilege Mode mode/ Enable mode, please verify the passwd has the correct permission. Use the command below to ensure the passwd file has the appropriate read/write permission.

chmod 664 /mnt/sda6/configs/cli/etc/passwd

Workaround

There is no workaround

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

Result 1 of 1

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware NSX for vSphere

Related Versions:

VMware NSX for vSphere 6.4.x

VMware NSX for vSphere 6.3.x

Take Our Survey

Support Assistant