SOLVED Way to Export Host Product Key?
Sorry if this has already been answered, but I’m struggling here. Is there a way to export a FOG host’s (Windows) product key? Long story short, we’ve manually added Windows product keys to FOG hosts, and we’re wondering if there is a way we can export a list of hosts and their respective Windows license key.
The “Export Hosts” feature from the FOG web management interface, doesn’t seem to export license info along with the other host information.
I’ve done some poking around the “fog” mysql database, to see if I can query or otherwise find these keys, but it appears to be encrypted (I believe). Log into mysql as root–>use fog; --> SELECT hostProductKey from hosts; --> output appears to be encrypted.
Any insight would be incredibly helpful!
@Tom-Elliott You are a super-human. Thank you so much! It works wonderfully.
Run this command and then look at your “reports” page.
You will have the product key’s within the CSV export.
wget -O /var/www/fog/management/reports/product_keys.report.php https://raw.githubusercontent.com/FOGProject/fogproject/working-1.3.5/packages/web/management/reports/product_keys.report.php
@Tom-Elliott You are an incredible human being. Just the hostname and the product key would be great. Exporting such data into any parsable text format would allow us to complete our project.
What items do you need the export to have? Hostname, ID, Mac, Product key? Just the product key?
@demise You wouldn’t be able to do this with mysql as you’re thought that the key’s are stored encrypted is accurate.
If you hit me on chat, however, I might be able to come up with a hook utility that would be able to do what you needed. I only say in chat because this isn’t exactly something I’d want the masses to be aware of (due to the sensitive nature of product keys).
Thanks for the speedy reply Tom! I should have been more specific in my post, but we’re looking to export the existing host keys to a .csv for another project, not to import to another FOG server.
We just want to compare a list of our Windows license keys (already in .csv format) against what the FOG server’s hosts already have associated with them.
Does that make sense? Is something like this even possible, or would it be too difficult for a mysql noob?
The values aren’t stored in the DB is plain text. You can export your hosts and reimport else where, but because of the “sensitive” nature of Product keys, we are not showing them in plain text.