After many years of using Safenet’s Sentinel RMS License Manager as the basis for its HPE Unified Functional Testing (UFT) concurrent licensing scheme, HPE decided to shift the licensing mechanism to its own in-house creation, HPE AutoPass License Server (APLS), beginning with HPE UFT 12.5x (and Service Virtualization 9.x). HPE’s aim was to bring powerful license management utilities under a single web-based interface. In doing so, a few flaws were born.
This post is the first part in an on-going series of good ol’ flaw fixing. This first blog will focus on suitable mail server configuration for recovering lost admin passwords and how to reinitialize the HPE APLS database in the event of a (demonic?) corruption without reinstalling the software or rebooting the server machine.
Mail Configuration
If you’re good at software implementation, you read the manual and noticed HPE emphasized the very first thing you need to do (once HPE APLS is installed) is configure your mail server. The paramount reason for configuring a mail server is HPE APLS admin password recovery (with the only alternative being wiping out the entire HPE APLS database and starting from scratch). Then, you no doubt immediately ran into multiple unanswered questions/issues: Exactly which credentials need to be specified? How can I properly set up the “User Name” field if only alphanumeric characters are allowed? What do they mean by “Test Mail”?
To untangle these issues, let’s start by defining both our HPE APLS admin and mail server example credentials:
- HPE APLS admin user name: admin (this is the default user used to log into HPE APLS)
- HPE APLS admin password: aplspw
- Mail server machine/host name: mailserver
- Email address we want HPE APLS admin emails sent from: server-admin@email.com
- Server-admin@email.com credentials user name: server-admin
- Server-admin@email.com credentials password: mailpw
- Email address we want the APLS mail configuration to send an email to in order to test our configuration: test-user@email.com
Now, let’s look at the HPE APLS mail configuration required fields (log in to APLS > Configuration > Main > Mail Configuration). Using our credentials above, we can safely enter the following fields.
Once entered, scroll to the bottom and click “Save.” So far, so good.
The next step would be to enter the email credentials (“User Name” and “Password” fields) for server-admin@email.com. Here, we run into our first problem trying to enter and save.
Unfortunately, HPE coded HPE APLS to only accept alphanumeric characters for the “User Name” field. Curses! This is a problem for any company that has a mandated email naming convention which includes non-alphanumeric characters (as our example, server-admin@email.com). If the email address/user name you are using only contains alphanumeric characters, lucky you, skip these steps.
Until HPE addresses this feature bug, we need to force our server-admin@email.com credentials another way.
1. On the license server machine, open Windows Services and stop the HPE APLS service.
2. Locate the following file, make a backup copy, and open with a text editor (location might be slightly different if you chose a different data directory during install).
C:\ProgramData\HP\HP AutoPass License Server\AutoPass\LicenseServer\data\conf\config.xml
3. Locate the following entry key (toward the bottom) and enter the email credentials user name (server-admin).
<entry key=”com.hp.autopass.mail.userName”>server-admin</entry>
4. Now, enter the email credentials password (mailpw) into the following entry key (toward the top of the file).
<entry key=”com.hp.autopass.mail.password”>mailpw</entry>
5. Save the config.xml file, then start the HPE APLS service via Windows Services.
Our email credentials are now saved in HPE APLS. The final step is to test our configuration by logging in to HPE APLS and entering our test email address, test-user@email.com, in the “Test Mail” field and clicking “Send Email.”
If we did everything correctly, we receive a message confirming our success.
When we check our target email, test-user@email.com, we see an email with the subject “Configuration Verified.”
Furthermore, we can now successfully use the “Forgot Password” link from the HPE APLS log-in screen, if ever needed. If you specify the default admin user, HPE APLS will send a password reset email to our admin email, server-admin@email.com.
Reinitialize (Reset) the HPE APLS Database
Things happen. Things like lost passwords and corruption. Things like aliens crash-landing in Antarctic and inevitably taking over the world. We’ll deal with the former. Good luck with the latter.
There are a couple of semi-likely scenarios that might warrant a “do-over” (forcing the HPE APLS to a default, clean-slate state). These scenarios include:
- You forgot your password but didn’t set up the mail configuration as a fail-safe for resetting it. You have no way of logging in. Shame on you, we just went over this.
- The HPE APLS database clearly became corrupted, showing “live” users who absolutely are not running HPE software and with no way to revoke. Your affected and expensive concurrent licenses are now useless. You’ve tried restarting the service. You’ve even tried removing and reinstalling the software (but forgot to wipe out the \data directory). Nothing works. Life is hard.
One method would be to uninstall HPE APLS, deleting the \data directory containing the HPE APLS database and re-installing the software from scratch. Easier said than done, as most companies require copious amounts of hoop-jumping just to reinstall software, as well as rebooting server machines.
Luckily, there’s a way to avoid re-installing the HPE APLS software and rebooting the server by following the steps below.
Be aware this will take HPE APLS back to its default state. Therefore, you will need to reload your licenses and redo your configuration. You have been warned, mister/ma’am.
1. If you have redundancy configured, disable on both primary and secondary servers (APLS > Configuration > Redundancy > Uncheck “Enable Redundancy”)
2. On the license server machine, open Windows Services and stop the HPE APLS service.
3. Navigate to C:\ProgramData\HP\HP AutoPass License Server\AutoPass\LicenseServer\ and create a backup of the entire \data directory within.
4. Rename the \database directory to \database.bak.
5. Start the HPE APLS service.
6. The HPE APLS is now back to its default state (User Name: admin and Password: password). You will need to specify your new admin password, load your licenses, and redo your configuration.