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 Apr 19, 2024 5:42 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 15 posts ] 
Author Message
PostPosted: Wed Dec 19, 2012 7:54 am 
Offline
Newbie

Joined: Wed Dec 19, 2012 7:31 am
Posts: 5
I just setup Open-Audit and love it. I can audit a system no problem that doesn't belong to a domain. But when I try and run the audit_windows_v12.vbs script on a computer that belongs to a domain (the domain is from ClearOS). I get an error from line 716: The specified domain either does not exist or could not be contacted. If I drop the system from the domain the script run s fine. Any ideas?

Thank you


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit Domain Problem
PostPosted: Wed Dec 19, 2012 8:17 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
You could try to see what it might be tripping up on by adding some debugging statements. Insert the following before line 716 in your script. It needs to be before the hr = oTranslate.set (1, domain_dn) line and after the domain_dn = "DC=" & Replace(system_domain,".",",DC=") line. Then post the output if it's not obvious what's happening.

[code]
if debugging > "0" then
wscript.echo "system_domain: " & system_domain
wscript.echo "domain_dn:" & domain_dn
end if
[/code]


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit Domain Problem
PostPosted: Wed Dec 19, 2012 11:22 pm 
Offline
Newbie

Joined: Wed Dec 19, 2012 7:31 am
Posts: 5
Both the values came back as "enterprise" which is what the domain is called. So not sure what the problem is.

Pete


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit Domain Problem
PostPosted: Thu Dec 20, 2012 5:03 am 
Offline
Newbie

Joined: Wed Dec 19, 2012 7:31 am
Posts: 5
I added the code and both came back with the name of my domain: "Enterprise"


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit Domain Problem
PostPosted: Fri Dec 21, 2012 2:19 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
They both came back with "enterprise" and nothing else? At the very least the domain_dn should have had "DC=enterprise". Also if system_domain was literally just "enterprise" then it may be a problem related to Windows not liking single label domains. You could try setting your domain to "enterprise.local" or something like that.

This is a minimal test for the failing bits. Set system_domain as appropriate for your config and see if you can get it to work.

put in file named domaintrans.vbs and run cscript domaintrans.vbs from a command prompt.
[code]
system_domain = "domain.com"


domain_dn = "DC=" & Replace(system_domain,".",",DC=")
set oTranslate = CreateObject("NameTranslate")
hr = oTranslate.Init (3, "")
hr = oTranslate.set (1, domain_dn)
full_ad_domain = oTranslate.Get(1)
full_domain = oTranslate.Get(2)
domain_nb = oTranslate.Get(3)
domain_nb = Left(domain_nb,Len(domain_nb)-1)

wscript.echo "full_ad_domain: " & full_ad_domain
wscript.echo "full_domain: " & full_domain
wscript.echo "domain_nb: " & domain_nb[/code]


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit Domain Problem
PostPosted: Wed Jan 16, 2013 7:08 am 
Offline
Newbie

Joined: Wed Dec 19, 2012 7:31 am
Posts: 5
I'm sorry for the delay getting back.

I get the same error when I run that: "The specified domain either does not exist or could not be contacted."


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit Domain Problem
PostPosted: Wed Jan 16, 2013 7:31 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
You stripped the detail out of the error so I can't see which line errored. Did you run my code as is or did you replace "domain.com" with "enterprise" in the first line? If you replaced domain.com then I'd try to rename your domain from "enterprise" to "enterprise.local" and see what happens.


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit Domain Problem
PostPosted: Thu Jan 17, 2013 7:28 am 
Offline
Newbie

Joined: Wed Dec 19, 2012 7:31 am
Posts: 5
Sorry the full message was:

(6,1) (null): The specified domain either does not exist or could not be contacted.

Yes I did replace the domain name. I'm going to update our controller from ClearOs to Zentyal in the next few weeks so maybe the problem is because I'm running an older version on ClearOS (v5.2)

Thanks,.


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit Domain Problem
PostPosted: Mon Feb 25, 2013 2:24 pm 
Offline
Newbie

Joined: Fri Feb 22, 2013 11:43 am
Posts: 23
I have the same issue and same error. Is there a way you can remove domain lookup and checking and bypass that piece?

Thanks


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit Domain Problem
PostPosted: Tue Feb 26, 2013 7:04 am 
Offline
Newbie

Joined: Fri Feb 22, 2013 11:43 am
Posts: 23
OK I was able to remove the code to fix this and not check AD.

Thanks


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 26, 2013 4:30 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
Maybe try the v13 audit script [url=http://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=5864]here[/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  
PostPosted: Wed Feb 27, 2013 12:03 am 
Offline
Newbie

Joined: Fri Feb 22, 2013 11:43 am
Posts: 23
Hi Mark

I will give this a try thanks so much for all your help. Would it be possible for the script to do the following?

- if it can't resolve the domain simply continue on but capture logged on user name (I noticed if domain fails the script errors out and if you bypass that code I can't get username of machine)

- Look at local Administrators group and capture the usernames in that group and add it to the database with the machine info? Maybe under users options for each machine like you have now you also have details showing who is part of local admin group?


Thanks so much for all your help.


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 27, 2013 6:38 am 
Offline
Newbie

Joined: Fri Feb 22, 2013 11:43 am
Posts: 23
Hi Mark

I tried this new script and it still fails on not finding domain. Would it be possible for the script to check if it can find domain and if not instead of erroring out just continue on and grab current logged on username and put that in the DB?

Thanks


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 27, 2013 7:45 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
Try the v15 script from [url=http://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=5864&p=20316]here[/url].
I added some error checking to bypass that section if the domain cannot be contacted.

_________________
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: Thu Feb 28, 2013 11:12 am 
Offline
Newbie

Joined: Fri Feb 22, 2013 11:43 am
Posts: 23
Hi -

This new script fixed the domain error issue where the script would simply quit and die if the domain could not be contacted. However I noticed that machines where domain could not be contacted don't display last logged on user in audit report it seems to be hit or miss. Is there any way to grab the user that is logged on when the domain is not available? Or perhaps the username of the person that runs the script and log that?

Thanks for all your help and for this excellent tool.


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.  [ 15 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