Put Computer Description from AD into FOG
-
We have FOG set up and its excellent, we are now starting to use more of the features, so I want to be able to update the computer description in AD and that replicate to FOG, either in the description field in fog or the user field.
I have a script set up that pulls the last user logged on into AD to update the description. Can this be somehow synced? Is this possible?
Thanks
-
This CAN be synced, but not with regular FOG code. I would write a shell script or php script that queries AD for a list of computer names and descriptions and then updates the fog database. Since you are using AD, the chance of multiple computers having the same name should not exist, so using the computer/host name as the key should suffice.
php should be able to do an LDAP query for all computers into an object or array, then iterate through all the computer records updating the FOG database and output the status to the log file for any errors. You can set this to run hourly through a cron job or however often you want it to sync.
If you are a decent programmer, you can have it so it only updates the records that have changed, possibly by keying off the last modified date of the computer objects in AD versus the last run time of the script.