Add user mapping
Add a new user mapping to a virtual server.
If the virtual server is configured in the global security context, the mapping will be added to the global context. Specify a virtual server ID of 0 to ensure the mapping is added to the global context. If the virtual server is configured to have an individual security context, the new mapping will only be associated with the specified virtual server.
HTTP request syntax (URI)
POST <base_URI>/v8/storage/virtual-servers/{virtualServerId}/mappings/user
Parameters
Name | Type | Required | Values | Description |
virtualServerId | URI_PARAM | Y | string/number | Specifies either the virtual server object ID or the HNAS storage virtual server ID. |
unixName | BODY | N | string | Unix username |
unixId | BODY | N | integer | Unix user ID |
noUnixMapping | BODY | N | boolean | If true, no automatic mapping will be attempted |
ntName | BODY | N | string | NT username |
ntId | BODY | N | string | NT user SID |
noNtMapping | BODY | N | boolean | If true, no automatic mapping will be attempted |
nfs4Name | BODY | N | string | NFSv4 username |
noNfs4Mapping | BODY | N | boolean | If true, no automatic mapping will be attempted |
kerberosName | BODY | N | string | Kerberos username |
noKerberosMapping | BODY | N | boolean | If true, no automatic mapping will be attempted |
Return codes
Code | Data | Description |
201 | userMapping | The user mapping has been successfully added. |
400 | Error Message | Missing or invalid request contents. |
403 | Error Message | Operation forbidden by access level. |
404 | Error Message | Requested resource not found. |
500 | Error message | Error associated with the storage system. |
Any HTTP status code other than 201 indicates that the API did not complete successfully.
Request example: Create a new global user with valid Unix details and NT name, and no Kerberos mapping
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v8/storage/virtual-servers/0/mappings/user -X POST -d '{"unixName":"newUser1", "unixId":899, "ntName":"EXAMPLE\\newUser1", "noKerberosMapping":true}'
Response example
HTTP/1.1 201 Created { "userMapping": { "isKerberosNameFixed": true, "isKerberosNameValid": false, "isNfs4NameFixed": false, "isNfs4NameValid": true, "isNtIdFixed": false, "isNtIdValid": false, "isNtNameFixed": true, "isNtNameValid": true, "isUnixIdFixed": true, "isUnixIdValid": true, "isUnixNameFixed": true, "isUnixNameValid": true, "kerberosName": "", "nfs4Name": "newUser1@localhost", "ntId": "", "ntName": "EXAMPLE\\newUser1", "objectId": "303a3a3a303a3a3a63393462643034322d613638342d313164382d393030342d3963353534373037356537353a3a3a303a3a3a4f49445f24232140255f56", "unixId": 899, "unixName": "newUser1" }, "uri": "https://172.27.5.11:8444/v8/storage/mappings/303a3a3a303a3a3a63393462643034322d613638342d313164382d393030342d3963353534373037356537353a3a3a303a3a3a4f49445f24232140255f56" }