Open-AudIT

What's on your network?
It is currently Tue Jan 23, 2018 6:13 pm

All times are UTC + 10 hours




Post new topic Reply to topic  [ 48 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Mac Audit
PostPosted: Wed Jan 26, 2011 8:09 am 
Offline
Helper

Joined: Wed Apr 07, 2010 8:04 am
Posts: 99
Location: Boston, MA
Thanks to one of our Mac experts, I got myself Xcode and started tweaking the script.

I made a change in System02 line to post Model, Type, Serial and Manufacturer.

Code:
    stringToWrite = [NSString stringWithFormat:@"system02%@%@%@%@ %@ %@ %@%@%@ %@%@%@ %@ %@ %@%@\n", sep, [hwItems objectForKey:@"machine_model"], sep, hostName, sep, sep, sep, sep, [hwItems objectForKey:@"machine_name"], sep, sep, [hwItems objectForKey:@"serial_number"], sep, systemManufacturer, sep, sep, sep, sep];


I think I'm getting the hang of this, I'll do some more work and testing and will let you know.
I can see the light at the end of the tunnel!!!
The question now is, what to do about Mac audit for OAv2 :?:

_________________
OA v1.5.2 on Windows Server 2003 and WAMP 2.0 (Apache 2.2.22, PHP 5.4.3, MySQL 5.1.36).
OA v1.5.3 on Linux
Auditing 500 Windows 7 computers via GPO, 200 Apple OSX 10.8/10.9/10.10


Top
 Profile  
Reply with quote  
 Post subject: Re: Mac Audit
PostPosted: Wed Jan 26, 2011 8:15 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1228
el_geto wrote:
The question now is, what to do about Mac audit for OAv2
Unfortunately you've just volunteered to modify the script to post OAv2 XML rather than the current format. Data's mostly the same. Shouldn't take more than a couple weeks. :lol:


Top
 Profile  
Reply with quote  
 Post subject: Re: Mac Audit
PostPosted: Wed Jan 26, 2011 10:20 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1935
Location: Brisbane, Australia
Hey - GO FOR IT !
See my reply here - http://www.open-audit.org/phpBB3/viewtopic.php?f=5&t=3997&p=17507#p17507

_________________
Support and Development hours available from Opmantek.
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
 Post subject: Re: Mac Audit
PostPosted: Tue Feb 22, 2011 9:30 am 
Offline
Helper

Joined: Wed Apr 07, 2010 8:04 am
Posts: 99
Location: Boston, MA
Hey everyone,
I just wanted to share my latest piece of code on the Mac Audit for OA. There isn't a lot of progress but I did a lot of cleaning and formatting and added most of the fields on System, Hardware. There are plenty of fields that still need to be completed, specially when is not on System Profiler.
If anyone would like to contribute and fill in more information that would be great.

Keep in mind that while this is aimed towards OAv1, I think that once we identify how to extract most of the information from OSX needed for a v1 audit, we could write a script for v2 as well, the XML output is heck of a lot easier to do.

Also, if anyone has any experience with online repositories and version control I think it would be a huge help.


Attachments:
File comment: Download all other files from this thread. Compile with XCode and Run.
mac_audit.m.zip [9 KiB]
Downloaded 243 times

_________________
OA v1.5.2 on Windows Server 2003 and WAMP 2.0 (Apache 2.2.22, PHP 5.4.3, MySQL 5.1.36).
OA v1.5.3 on Linux
Auditing 500 Windows 7 computers via GPO, 200 Apple OSX 10.8/10.9/10.10
Top
 Profile  
Reply with quote  
 Post subject: Re: Mac Audit
PostPosted: Wed Jun 29, 2011 9:07 am 
Offline
Newbie
User avatar

Joined: Wed Jun 29, 2011 8:39 am
Posts: 7
Location: Dallas, Texas
Greetings everyone.. I know this probably wont work on all versions of macs but I have been configuring a reposado server (SUS for mac , offered up by Disney) on a Centos Box and found that you can get a really good hardware platform blast if you use the command line..

systemprofiler -detailLevel basic or full, if you wanted to go that far. I used the following url below

http://ss64.com/osx/system_profiler.html

i am too lazy to try and convert it to a format that open-audit needs but the fleet-of-foot and time could get it done pretty easily..

Cheers.

emb3dd3d

_________________
OpenAudit :

Hosted on CentOS 5.8 (Apache 2.2.2x+MySQL 5.x.x+PHP 5.2.x)
Auditing on WAN :
~2 Windows Servers (2K3 R2)
~15 Workstations (XP SP2/3)
~42 Linux Servers
~10 Apple OSX mac-minis
~1 Apple OSX iMac
~2 Apple MacPro
~9 Apple MacBook Pros


Top
 Profile  
Reply with quote  
 Post subject: Re: Mac Audit
PostPosted: Thu Jun 30, 2011 3:53 am 
Offline
Newbie
User avatar

Joined: Wed Jun 29, 2011 8:39 am
Posts: 7
Location: Dallas, Texas
I am currently using the script and it collects Ok info.. but I have a question? Why not use the built in command line tool in OSX to assist?

system_profiler -detailLevel {basic|full} . This spits out a lot of crap that could be useful in
Auditing OSX devices. I would try to write something to dump it in the format required for openaudit.. but alas, I am lazy and a little overwhelmed with another project atm. Check this out
and let's hear your thoughts.

here is the link i got the command from. http://ss64.com/osx/system_profiler.html

_________________
OpenAudit :

Hosted on CentOS 5.8 (Apache 2.2.2x+MySQL 5.x.x+PHP 5.2.x)
Auditing on WAN :
~2 Windows Servers (2K3 R2)
~15 Workstations (XP SP2/3)
~42 Linux Servers
~10 Apple OSX mac-minis
~1 Apple OSX iMac
~2 Apple MacPro
~9 Apple MacBook Pros


Top
 Profile  
Reply with quote  
 Post subject: Re: Mac Audit
PostPosted: Wed Aug 10, 2011 6:04 am 
Offline
Newbie
User avatar

Joined: Wed Jun 29, 2011 8:39 am
Posts: 7
Location: Dallas, Texas
nevermind.. I just found the source code for the mac_audit and saw that you are using the system_profiler command.. It appears to just be a formatting issue..

_________________
OpenAudit :

Hosted on CentOS 5.8 (Apache 2.2.2x+MySQL 5.x.x+PHP 5.2.x)
Auditing on WAN :
~2 Windows Servers (2K3 R2)
~15 Workstations (XP SP2/3)
~42 Linux Servers
~10 Apple OSX mac-minis
~1 Apple OSX iMac
~2 Apple MacPro
~9 Apple MacBook Pros


Top
 Profile  
Reply with quote  
 Post subject: Re: Mac Audit
PostPosted: Thu Mar 01, 2012 12:39 am 
Offline
Newbie

Joined: Mon Feb 13, 2012 10:21 pm
Posts: 11
When i run the open_mac_audit.command am getting this error please help me

/Volumes/SoftwareDetails/published-open_mac_01audit/open_mac_audit.command ; exit;
IMAC004:~ root# /Volumes/SoftwareDetails/published-open_mac_01audit/open_mac_audit.command ; exit;
/Volumes/SoftwareDetails/published-open_mac_01audit/open_mac_audit.command: line'27: syntax error near unexpected token `do
/Volumes/SoftwareDetails/published-open_mac_01audit/open_mac_audit.command: line'27: ` for server in $(grep -v "^#" servers.cfg); do
logout


Top
 Profile  
Reply with quote  
 Post subject: Re: Mac Audit
PostPosted: Thu Mar 01, 2012 10:59 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1228
The Mac audit stuff is pretty rough and best left for experienced Mac users who can deal with XCode.

Having said that what's the content of your servers.cfg file look like?


Top
 Profile  
Reply with quote  
 Post subject: Re: Mac Audit
PostPosted: Thu Mar 01, 2012 11:00 pm 
Offline
Newbie

Joined: Mon Feb 13, 2012 10:21 pm
Posts: 11
Hi,

Yes i have complied with xcode and get the Mac.txt file also. But when i run the automated script to upload to the server am getting those error.i have upload the Mac.txt manually to the server its working fine using this command

#!/bin/sh
./mac_audit
curl --data-urlencode add@mac.txt "http://dell025.lsd.com/openaudit/admin_pc_add_2.php"

and updating the output. But when i run the automated script only am getting this error. Here with i have attached my all files please help me.


Attachments:
Mac.zip [15.04 KiB]
Downloaded 112 times
Top
 Profile  
Reply with quote  
 Post subject: Re: Mac Audit
PostPosted: Fri Mar 02, 2012 2:32 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1228
OK. This may sound stupid but did you edit the servers.cfg file in the ~/Library/open_mac_audit directory or somewhere else?


Top
 Profile  
Reply with quote  
 Post subject: Re: Mac Audit
PostPosted: Fri Mar 02, 2012 11:59 pm 
Offline
Newbie

Joined: Mon Feb 13, 2012 10:21 pm
Posts: 11
I have checked and the link i provided for the server is correct. when i do that manually its working.


Top
 Profile  
Reply with quote  
 Post subject: Re: Mac Audit
PostPosted: Sat Mar 03, 2012 2:12 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1228
Sorry, I wasn't specific enough about my suspicions.

The version of the mac audit that you're using expects to be installed into "~/Library/open_mac_audit" by the one_time_DOUBLE_CLICK_TO_install_open_mac_audit.command script. When you call the open_mac_audit.command it is trying to use the servers.cfg file that is located in "~/Library/open_mac_audit" and if you haven't edited that file you won't have any server to post to.

And now that I've reread your original error messages I suspect I might be right here. The error messages say you're running the open_mac_audit.command file in "/Volumes/SoftwareDetails/published-open_mac_01audit" and not in "~/Library/open_mac_audit".


Top
 Profile  
Reply with quote  
 Post subject: Re: Mac Audit
PostPosted: Sat Mar 10, 2012 1:13 am 
Offline
Newbie

Joined: Mon Feb 13, 2012 10:21 pm
Posts: 11
genloz wrote:
Hi Everyone,

I thought you might be interested in an objective C script that runs on mac os x. It's an xcode project so you'll need to download xcode to compile it on your platform but after that it should run on similar platforms without issue...

There are still a few key things missing - mostly hardware and networking items.
But it's a good start for the basics:
system name, chassis, os, uuid, ip, subnet, processor, memory, software names and versions, ip routes, users & groups...

This script produces a file called mac.txt which I upload with a little bash script to our server:

#!/bin/sh
./mac_audit
curl --data-urlencode add@mac.txt "http://ourhost/openaudit/admin_pc_add_2.php"

You may need to upgrade curl to use '--data-urlencode'...

Thanks!


Hi ,

I have followed the above mentioned method for my mac systems. I can able to compile using xcode and run it successfully from Mac OS X 10.6 and 10.5. But my problem is i cant compile for Mac OS X 10.4.11 which i have in 40 systems. Can any one guide me to do this for Mac OS X 10.4.11. I have attached the files also, can anyone helpme.


Attachments:
mac_audit_.zip [25.67 KiB]
Downloaded 106 times
Top
 Profile  
Reply with quote  
 Post subject: Re: Mac Audit
PostPosted: Sat Mar 10, 2012 2:06 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1228
I don't have Macs so keep that in mind.

You say you can't compile but you don't say why. No proper XCode version, errors, what? From what I've seen for 10.4 you need XCode 2.5 available in the Downloads->Developer Tools section of connect.apple.com.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 48 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group