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 Aug 23, 2019 7:08 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: Tue Apr 09, 2013 8:59 pm 
Offline
Newbie

Joined: Tue Apr 09, 2013 8:15 pm
Posts: 7
hello,

i'm a french new user (sorry for my bad english)
i can audit machine from remote place with no problem but in "Windows Detail" tab, the domain info is not correct, i ve always "Domain: workgroup", although the machine is a domain member.
it's french localised machine, and i'v tried with vbs 18.
perhaps i've missing a subtil thing?

thanks :)


Last edited by jpa on Sat Apr 13, 2013 4:47 am, edited 1 time in total.
Added [bug] to subject


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 10, 2013 1:29 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
If you can run Powershell commands what does the following return?
Code:
Get-WmiObject -Class Win32_ComputerSystem |fl PartOfDomain


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 10, 2013 5:07 am 
Offline
Newbie

Joined: Tue Apr 09, 2013 8:15 pm
Posts: 7
hello,

on my own windows 7 pro PC member of a domain y receive: PartOfDomain : True
in the tab in OA: Domain: workgroup


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 11, 2013 1:34 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
Not sure what's going on. It would help to see the audit output. If you're not worried about me seeing your audit info you could PM me the audit file created by running this command.

Code:
cscript audit_windows.vbs strcomputer="." create_file="y"


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 11, 2013 6:53 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
Think I found the problem. Try these changes and see what happens.

Line 713:
Code:
change from
if windows_part_of_domain = "True" then
to
if windows_part_of_domain = True then


Line 793:
Code:
change from
if ((windows_part_of_domain = "True") and (windows_user_work_1 > "")) then
to
if ((windows_part_of_domain = True) and (windows_user_work_1 > "")) then


More generically for Mark I wonder if you need to go through and change all the '= "True" ' comparison checks? "True" localizes to "Vrai" in French which blows up your tests because you're comparing strings and not Boolean.


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 11, 2013 8:03 pm 
Offline
Newbie

Joined: Tue Apr 09, 2013 8:15 pm
Posts: 7
this is good!
When I remove the "" I have the domain name that appears!
should I remove all the quotes for true?

update, i've tried with classic VBS from my OA installation and it's ok, but when y tried this with vbsV18 i've have juste à - caracter and many info are missing


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 12, 2013 1:20 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
PM me the output from the v18 audit so I can see what happened.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 12, 2013 3:28 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
Find the following around line 718 and put a single quote before the lines starting with "on error":

Code:
   on error resume next
      hr = oTranslate.Init (3, "")
   on error goto 0

Make sure you have debugging = "3" at the beginning of the script. Then run the audit which I suspect will crash. Report back with the screen output.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 12, 2013 5:37 am 
Offline
Newbie

Joined: Tue Apr 09, 2013 8:15 pm
Posts: 7
quote like this?

' on error resume next
hr = oTranslate.Init (3, "")
' on error goto 0

with debugging = "3"
i don't receive any error
and same result in OA


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 12, 2013 7:13 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
OK then. What is the output if you run the attached vbscript? Save the file as testdomain.vbs and run with "cscript testdomain.vbs" and post or PM the output.


Attachments:
testdomain.txt [1.65 KiB]
Downloaded 231 times
Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 12, 2013 7:41 am 
Offline
Newbie

Joined: Tue Apr 09, 2013 8:15 pm
Posts: 7
output is ok, all info are correct :)
I just replaced the real name by "mydomaine" and "Myserver"

full_ad_domain: DC=mydomaine,DC=local
full_domain: mydomaine.local/
domain_nb: mydomaine\
domain_nb2: mydomaine
windows_client_site_name: Default-First-Site-Name
windows_domain_controller_address: 192.168.1.240
windows_domain_controller_name: Myserver


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 13, 2013 4:31 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
How are you running the audit script? Are you running as the same user you used to run my test script?


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 13, 2013 4:43 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
I think this is it and would affect everyone not just French language users:

Code:
Change line 760 from
   if (isnull(hr) or hr = "") then
to
   if (isnull(hr)) then


So this thread covers two bugs:
1. Problems with localized Windows and testing against string "True" rather than boolean True.
2. v18 changes for testing if domain lookups can be done and not failing audit if not


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 13, 2013 7:50 am 
Offline
Newbie

Joined: Tue Apr 09, 2013 8:15 pm
Posts: 7
cool! with this two fix, windows detail tab is complet with vbs18!
just a question, for "true", I'm not sur to have understand.. must i remove the "" for all "true" in vbs script? or just for the two line windows_part_of....?
thanks!!


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 13, 2013 8:17 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
Some of the comparisons should probably have the quote removed but you'd need to review each instance to make sure.

After a quick look I see at least the file_exists test at 1869 is correct. Although it's really wrong as it should be "file_exists = True" and the file_exists = "false" and file_exists = "true" around line 1810 should be changed. This is more for Mark than you. Hopefully he's already fixed all the stuff we've been finding lately or at least been paying attention so we don't get the next release full of bugs we've already found and fixed.


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 10 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