Accessing the root privileged mode from the NSX CLI

Reading Time: 3 minutes

Accessing the root privileged mode from the NSX CLI is an article that shows how to change from admin to root shell in the NSX Manager Appliance.

First and foremost, we wrote some articles related to the NSX. The first one is an introduction to NSX-T. You can access this article by the following link:
Introduction to NSX-T – DPC Virtual Tips

Another one has all the necessary steps to deploy the NSX Manager Cluster:
NSX Manager Deployment Steps – DPC Virtual Tips

A little introduction of NSX Manager users

By default, during the NSX Manager deployment, we need to set up the password for the following users:

  • admin
  • root
  • audit –> Opcional user

The “admin” user is the administrator username. We can access the NSX Manager by SSH or by GUI with this user to perform admin tasks like adding other Manager Controllers or creating a segment, for example.
The “root” user is the administrator for the Manager Appliance. We can access the NSX Manager Appliance with this user and perform tasks like seeing service status, checking file logs, etc.

For each user, a Role can be assigned. This role has the user’s permission into the NSX Manager Cluster. In the following picture we can see the users and their roles:

Note: The role “Auditor” assigned to the “audit” user provides the “read-only” access to the user audit”

Accessing the NSX Manager Appliance by SSH

As we told you before, we can access the NSX Manager appliance by SSH. It is an excellent way to perform some troubleshooting or do some analysis.

After accessing the NSX Manager by SSH with the “admin” username, the command prompt that we will see is similar to the following picture:

The character “>” indicates that we are logged in with the “admin” username.

If we need to access the NSX Manager appliance with the “root” username, the command prompt that we will see is similar to the following picture:

The character “#” indicates that we are logged in with the “root” username.

Changing from the “admin” to the “root” privileged mode

There is a way to change from “admin” to the “root”. You can type the bellow command in the NSX command line logged in with the “admin” user:

st en

Type the “admin” password:

That’s it 🙂

Now we are in the root privilege command line. We can check the service status, see log files, and other tasks related to this mode.

In the following picture, for instance, we are checking the “nsx-ccp” (NSX Central Control Plane) service status:

If necessary go back to the “admin” command prompt, we can type exit to do that:

exit