About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Troubleshooting
Problem
Password authentication may fail if passwords are cached using the nzpassword command while the default environment variable for NZ_PASSWORD is defined.
Symptom
After setting up my database account such that it uses the nzpassword command, you are getting an 'Password authentication failed' error.
Scenario:
1. Log in as the nz user
2. Create the stored password by running the following command:
nzpassword add -u testuser -pw [my_password] -host [hostname]
No error appears.
3. Check that the password file was created:
ls -lart .nzpassword
Example output follows:
[nz@nzhostha2 ~]$ ls -lart .nzpassword
-r-------- 1 nz nz 62 Apr 16 22:24 .nzpassword
[nz@nzhostha2 ~]$ nzpassword show
Host User
-------- ------------
nzhostha2 testuser
4. However, when you try to log in to nzsql using the following commands, it does not work:
[nz@nzhostha2 ~]$ nzsql nzsql: Password authentication failed for user 'testuser'
Resolving The Problem
The error may occur because the NZ_PASSWORD environment variable is set. This setting causes NPS to use the admin password which likely does not match with any other user account.
To resolve this error, do the following:
1. Open the ~/.bashrc file for editing and comment out the setting of the NZ_PASSWORD environment variable.
2. Use the nzpassword command to add the password for admin. The following is an example:
nzpassword add -u ADMIN -pw my_admin_password -host nzhostha2
where my_admin_password is the password for the admin account and nzhostha2 is the hostname or IP address.
3. You should be able to log in using one of the following commands:
nzsql (will log in as admin) or
nzsql -u testuser (will log in as testuser)
[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Historical Number
NZ799953
Was this topic helpful?
Document Information
More support for:
IBM PureData System
Software version:
1.0.0
Document number:
461211
Modified date:
17 October 2019
UID
swg21568828