Open-AudIT
https://www.open-audit.org/phpBB3/

Mac OS X Audit (consolidated request thread + some work done
https://www.open-audit.org/phpBB3/viewtopic.php?f=9&t=2637
Page 1 of 1

Author:  scott [ Sat Feb 16, 2008 1:54 am ]
Post subject:  Mac OS X Audit (consolidated request thread + some work done

I've seen a lot of posts recently with requests for this and some posts by developers that they have done some preliminary work on it.

I wanted to repost the old work I did on this in hopes of speeding up the process.

Here was my old post:

[quote]
I hacked together an audit script using admin_pc_add_2.php from Open-AudIT and a Mac agent for OCS Inventory which can be found at http://codejanitor.com/wp/2006/02/16/oc ... 0-released

Before you run it, search the file for "CHANGEME" and replace all occurances with the suitable info for you.

I tried to put in comments where it seems necessary. But here's a warning that I'm not a PHP coder and I'm sure there's better ways to do it.

Mac Audit 0.0001: http://k-thx.com/~scott/mac_audit.zip

This zip contains the main audit.php script, the 2 scripts I used to make it, and the expect script (read below about it).

[code]
Usage:

php audit.php

or

php audit.php xmlprofile.spx
[/code]

For the first option you run it on the remote machine you want to audit. The second option can be run from any machine.

This script will get all the info from System Profiler and populate the Open-Audit database.

Currently, lots of hardware is left out. I have no need for all of it so it isn't included right now. Feel free to modify it and add in whatever you want. It isn't very hard once you understand how it works; it's just tedious.


A few things to mention:

1. This work was based on whatever version of OA was out last summer so it may be different now.
2. The code I used was based on a PHP script built for another inventory app.

The author of that script has since updated it: http://codejanitor.com/wp/2007/12/20/oc ... -released/

My point of this post is just sharing this work so no one ends up doing a lot of unnecessary duplicate coding.

To recap:

OS X has a System Profiler which can output all its information in XML format. A PHP script has already been made to read and parse all this information. In order for it to work in OA, the data has to be parsed into the format OA needs and inserted into the db which is what my script already did.

Hopefully this helps the developers :). I also think it would be good to have this thread be the consolidated OS X audit thread so there isn't information all over the place. Maybe even sticky it?

Author:  chargr [ Fri Mar 14, 2008 3:34 am ]
Post subject:  Re: Mac OS X Audit (consolidated request thread + some work done

Hi Scott,

I downloaded your script and code janitor's latest release. However I am not sure which entries to change in the "ocs_mac_agent.php" file.

Here is my current info to my open audit server: "http://192.168.1.10/openaudit/index.php"

how/where can I update that info to audit apple macs?

Sorry i'm not proficient with macs.

thanks

Author:  scott [ Thu Mar 20, 2008 11:58 pm ]
Post subject:  Re: Mac OS X Audit (consolidated request thread + some work done

You don't need to download anything from code janitor unless you actually want to re-code your own audit script.

All you need to do is download the mac_audit.zip, search the file for "CHANGEME" and replace it with the appropriate values. Then run audit.php on a Mac computer.

My audit.php script was based on an older version of Open-AudIT so I can't guarantee that it still works. The reason I made this thread was to help people who wanted to make their Mac audit script.

Author:  chargr [ Tue Apr 08, 2008 10:37 pm ]
Post subject:  Re: Mac OS X Audit (consolidated request thread + some work done

Thanks, I will give this a try today. Hope it works.


here's what i did so far.

edited the "changeme" sections of the audit.php file.

i ran the php audit.php command in terminal. The errors i received are "parse error lines 25" and line 194.

I'm assuming it's probably one of the changeme variables.



thanks

Author:  scott [ Wed Apr 09, 2008 12:28 am ]
Post subject:  Re: Mac OS X Audit (consolidated request thread + some work done

Desktop is fine. Run the script by typing in the following in terminal with an admin account:

php audit.php

Just to warn you again: I have no idea if it will still work. I would be surprise if nothing is broken.

Author:  chargr [ Wed Apr 09, 2008 12:51 am ]
Post subject:  Re: Mac OS X Audit (consolidated request thread + some work done

oopps i edit the post above..

i got parse error with line 25 and line 194...

so far my mac is still chugging along, everything seems to be working

Author:  PEPSANSO [ Wed Jan 13, 2010 3:16 am ]
Post subject:  Re: Mac OS X Audit (consolidated request thread + some work done

Hi,
I'm looking for the file:

Mac Audit 0.0001: http://k-thx.com/~scott/mac_audit.zip

Somebody knows it's possible to obtain it in another place?, or can you send-it to me?.
Thanks a lot.
Pep Sansó

Author:  genloz [ Sat Jun 05, 2010 4:29 pm ]
Post subject:  Re: Mac OS X Audit (consolidated request thread + some work done

In the absence of being able to find scott's script anywhere I've started my own:
viewtopic.php?f=5&t=3678

Would love some help to finish off the missing hardware and networking items...

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/