Create User Account to Access Nutanix REST API
To create a user account using the ncli utility:
-
Download and install the ncli (Nutanix command-line interface) on any server in your infrastructure, as described here.
-
Start the utility and establish a ncli session by the following command:
ncli -s management_ip_addr -u 'username' -p 'user_password'
here:
management_ip_addr
- the IP address of any Nutanix Controller VM in the clusterusername
- user name to access that VM; if not specified, admin (default name) will be useduser_password
- password to access that VM
-
Run the
fs list
command in ncli to get the list of Nutanix Files servers. -
Locate the name of Nutanix Files server you want to audit; locate and save the following server parameters to a text file:
- Uuid - Nutanix Files server ID
-
Finally, create a new user and specify credentials that will be used to access this Nutanix Files server. For that, run the following command in ncli :
fs add-user uuid=<fs_uuid> user=<username> password=<password>
here:
<fs_uuid>
- Nutanix Files server ID (Uuid)<username>
- user name<password>
- password
To create a new user account with Nutanix Prism:
-
Open Nutanix Prism web portal.
-
Select File Server category. In the list of servers, select the server you want to audit.
-
Click Manage roles.
-
In the Manage roles dialog locate the REST API access user section and click +New user.
-
Enter local user account name and password, then click Save next to them to save the settings.
-
Click the Close button to close the Manage roles dialog.