Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Mar 29, 2024 9:58 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 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
Contributor

Joined: Wed Apr 07, 2010 8:04 am
Posts: 105
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];
[/code]

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 :?:

_________________
Old OA Setup: 500 Windows 7 workstations & 200 Apple OSX with OA v1.5.2 on Windows Server 2003 and WAMP 2
New OA Setup: 100 Windows servers with OA 2.2 on Windows Server 2016 and WAMP 3


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: 1259
[quote="el_geto"]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: 1964
Location: Brisbane, Australia
Hey - GO FOR IT !
See my reply here - [url]http://www.open-audit.org/phpBB3/viewtopic.php?f=5&t=3997&p=17507#p17507[/url]

_________________
Support and Development hours available from [url=https://opmantek.com]Opmantek[/url].
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
Contributor

Joined: Wed Apr 07, 2010 8:04 am
Posts: 105
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 499 times

_________________
Old OA Setup: 500 Windows 7 workstations & 200 Apple OSX with OA v1.5.2 on Windows Server 2003 and WAMP 2
New OA Setup: 100 Windows servers with OA 2.2 on Windows Server 2016 and WAMP 3
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

[url]http://ss64.com/osx/system_profiler.html[/url]

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. [url]http://ss64.com/osx/system_profiler.html[/url]

_________________
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: 1259
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 364 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: 1259
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: 1259
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
[quote="genloz"]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 361 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: 1259
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  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 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 2 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