Why do I get a "401 unauthorized" error when running Platform Admin Application commands in version 4.3?
Example:
bin/platform-admin.sh show-platforms Command failed due to an error: Unauthorized API code 401 Session expired. Please login and run the command again.
From version 4.3, users will need to first login to the Platform Admin Application before issuing the desired commands.
The default username is admin and the password is the one give to you at the time of installation.
Example of setting the Platform Admin database password:
How to login:
bin/platform-admin.sh login --user-name=admin
Forgot admin password? How to reset:
bin/platform-admin.sh reset-password --help usage: platform-admin.sh reset-password [-h] [-u USER-NAME] optional arguments: -h, --help show this help message and exit -u USER-NAME, --user-name USER-NAME The username whose password to reset. If not supplied, 'admin' is assumed. And this will reset the password for the user to the default which is admin.
Note: After resetting the password, the default username and password will be admin/admin. Immediately change the password to something more secure.
How to change password:
bin/platform-admin.sh change-password --help
usage: platform-admin.sh change-password [-h] --user-name USER-NAME [--password PASSWORD] [--new-password NEW-PASSWORD]
Once the user is successfully logged in, they can enter the desired command.