The nz users command
When you migrate a database and its users from a source system to a target system, you must synchronize the users between the two systems. Typically, you would run the nzbackup -globals and nzrestore commands to do that. However, on Netezza on Cloud users are managed through Cloud Pak for Data, and all users that are in the Netezza catalog must be also on Cloud Pak for Data.
After migration, you must synchronize the users that were migrated and are in the Netezza catalog but not on Cloud Pak for Data by running the nz users sync-from-nps command.
The nz users sync-from-nps command determines which users from the Netezza catalog are not on Cloud Pak for Data, and adds them.
The nz users assign-to-nps command determines which users are present in Cloud Pak for Data but not in Netezza catalog and adds them in Netezza catalog.
The nz users remove-from-nps commands helps to remove the user from Netezza catalog.
Syntax
nz users [subcommand] [options]
Inputs
| Subcommand | Description |
|---|---|
| ls | List all defined users. |
| create | Create new users. |
| sync-from-nps | Sync users migrated/defined in Netezza Performance Server that are not in CPD. |
| assign-to-nps | Assign one or more users to specified Netezza Performance Server instance. |
| remove-from-nps | Remove one or more users from the specified Netezza Performance Server instance. |
| Option | Description |
|---|---|
| -h|-help | Displays the help message. |
| -host | Required. Specifies the Cloud Pak for Data hostname of the platform. |
| -apiserver | Required. Specifies Netezza Performance Server hostname. |
| -new-pw | Specifies the new password for Cloud Pak for Data users. . You must set a new temporary password for each user that is synchronized because the passwords in the Netezza catalog are encrypted and cannot be decrypted to plain text. |
| -nps-host | Required. Specifies the NPS hostname. |
| -print-only | Displays the user or users that need to be synchronized. |
| -u | Required. Specifies the Cloud Pak for Data user. |
| -pw | Required. Specifies the Cloud Pak for Data user password
[NZ_PASSWORD]. |
Examples
-
nz users sync-from-nps -nps-host $NZ_HOST -u $NZ_USER -pw $NZ_PASSWORD -host $CPD_HOST -new-pw <new-pw> -apiserver <apiserver> USERNAME NEEDS TO BE SYNCED NEEDS TO BE ASSIGNED -------- ------------------ --------------------- alice Y Y bob Y Y 2 users created in CPD 2 users assigned to instance instance-name namespace namespace-name