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 3:52 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
PostPosted: Tue Jul 22, 2014 12:13 am 
Offline
Newbie

Joined: Fri Jul 18, 2014 12:54 am
Posts: 3
Hello all! First off, I want to thank the devs for such an awesome app. We are using it in my workplace to audit computers over several sites, and it is great so far!

However, the Mac scripts do not work. In order for me to get to them, I had to move them to a public directory on the server, as there is no Audit my PC button. Second of all, when I run the scripts, I get a flood of errors, all stating the same thing. It says ./audit_osx.sh: line xxx (where it's a sequential number): $xml_file: ambiguous redirect.

Any ideas would be appreciated!


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 22, 2014 11:40 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
"Audit My PC" buttons for Linux and OSX will be in the next release.
In the meantime, copy the script to the target Mac and make sure you run it using sudo.

_________________
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  
PostPosted: Tue Jul 22, 2014 11:25 pm 
Offline
Newbie

Joined: Fri Jul 18, 2014 12:54 am
Posts: 3
I did all of that, however it still doesn't work, and returns that error. I DID run it with sudo.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 23, 2014 1:17 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
I don't run Macs but looking at the code perhaps the xml_file isn't getting created as expected.
[code]xml_file="$system_hostname"-`date +%Y%m%d%H%M%S`.xml[/code]

So what is the output of the following:
[code]networksetup -getcomputername[/code]

What about the following:
[code]date +%Y%m%d%H%M%S[/code]


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 23, 2014 2:05 am 
Offline
Newbie

Joined: Fri Jul 18, 2014 12:54 am
Posts: 3
[quote="jpa"]I don't run Macs but looking at the code perhaps the xml_file isn't getting created as expected.
[code]xml_file="$system_hostname"-`date +%Y%m%d%H%M%S`.xml[/code]

So what is the output of the following:
[code]networksetup -getcomputername[/code]

What about the following:
[code]date +%Y%m%d%H%M%S[/code]


networksetup returns
getcomputername: error reading from the dynamic store (name == NULL).
** Error: Unable to access the System Configuration database.

date returns
20140722120451

Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 23, 2014 2:07 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
So if you ran the networksetup with sudo and it gave you this message then you need to figure out the problem with that command. I don't run Macs. I can't help you with that.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 27, 2014 1:29 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
[code]networksetup -getcomputername[/code]
If I run this (without even sudo) I get a result. Obviously using sudo I also get a result (the hostname of my Mac).
You could try replacing the line
[code]system_hostname=`networksetup -getcomputername`[/code]
with
[code]system_hostname=`hostname | cut -d. -f1`[/code]
in audit_osx.sh

_________________
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  
PostPosted: Tue Jul 29, 2014 6:48 am 
Offline
Contributor

Joined: Wed Apr 07, 2010 8:04 am
Posts: 105
Location: Boston, MA
What OSX Version are you getting this? I've tested the script on 10.6 to 10.9 so far with good results.

_________________
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  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

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:  
Powered by phpBB® Forum Software © phpBB Group