| title | Update AZDATA_PASSWORD |
|---|---|
| description | Update the `AZDATA_PASSWORD` manually |
| author | NelGson |
| ms.author | negust |
| ms.reviewer | mikeray |
| ms.date | 12/19/2019 |
| ms.topic | conceptual |
| ms.prod | sql |
| ms.technology | big-data-cluster |
[!INCLUDEtsql-appliesto-ssver15-xxxx-xxxx-xxx]
Whether or not the cluster is operating with Active Directory integration, AZDATA_PASSWORD is set during deployment. It provides a basic authentication to the cluster controller and master instance. This document describes how to manually update AZDATA_PASSWORD.
If the cluster is operating in non-Active Directory mode, update the Apache Knox Gateway password by doing the following:
-
Obtain the controller SQL Server credentials by running the following commands:
a. Run this command as a Kubernetes administrator:
kubectl get secret controller-sa-secret -n <cluster name> -o yaml | grep password
b. Base64 decode the secret:
echo <password from kubectl command> | base64 --decode && echo
-
In a separate command window, expose the controller database server port:
kubectl port-forward controldb-0 1433:1433 --address 0.0.0.0 -n <cluster name>
-
Use the system administrator password, which you just obtained, to connect to the controller database server from a SQL client tool.
-
Generate a new complex password for
AZDATA_USERNAMEto replace the existingAZDATA_PASSWORD.To simplify the example, the next steps use "newPassword" because the generated password is "newPassword".
-
Get
hexsaltfrom the users table:SELECT hexsalt FROM [auth].[users] WHERE username = '<username>'
hexsaltreturns a random hex string (for example,64FC59DF31244FFEE02F457BC0750226). -
Encrypt the new complex password by using
hexsalt:For your convenience, we provide a pre-built tool
pbkdf2to encrypt the password. Download the platform-appropriate .NET Core app forpbkdf2.The app is self-contained and requires no prerequisites, such as .NET runtimes. To encrypt the password run:
pbkdf2 <password> <hexsalt> J2y4E4dhlgwHOaRr3HKiiVAKBfjuGDyYmzn88VXmrzM=
-
Update the password in the users table:
UPDATE [auth].[users] SET password = 'J2y4E4dhlgwHOaRr3HKiiVAKBfjuGDyYmzn88VXmrzM=' WHERE username = '<username>'
-
Connect to the master SQL endpoint with any administrator user.
-
To change the password for the login credentials that you defined during deployment in the parameter
AZDATA_USERNAME, run the following TSQL command:ALTER LOGIN <AZDATA_USERNAME> WITH PASSWORD = 'newPassword'