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 Tue Mar 19, 2024 1:32 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
PostPosted: Mon Aug 03, 2015 11:25 pm 
Offline
Newbie

Joined: Tue Nov 04, 2014 1:12 am
Posts: 9
Hello everyone

I would like an information

It is possible to make a audite_windowns.vbs that places the same information in the Location Name?

[attachment=0] open.png
open.png [ 70.33 KiB | Viewed 11092 times ]


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 04, 2015 5:24 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
Yes, but you'll need to edit the audit_windows.vbs a bit.

Find the ID for your Location by viewing the Admin->List Locations view. Hover over the name of the Location you want to use and view your browsers URL for the link. The number at the end of the URL is your Location's ID.

For the non-fancy, hardcoded version find the <sys> output sections in the audit_windows.vbs and add the man_location_id field. You'll need to change the "[PUT YOUR LOCATION ID HERE]" to the location ID from above.

Normal section around line 1083
[code]result.WriteText "<?xml version=""1.0"" encoding=""UTF-8""?>" & vbcrlf
result.WriteText "<system>" & vbcrlf
result.WriteText " <sys>" & vbcrlf
result.WriteText " <timestamp>" & escape_xml(system_timestamp) & "</timestamp>" & vbcrlf
result.WriteText " <uuid>" & escape_xml(system_uuid) & "</uuid>" & vbcrlf
result.WriteText " <hostname>" & escape_xml(system_hostname) & "</hostname>" & vbcrlf
result.WriteText " <domain>" & escape_xml(system_domain) & "</domain>" & vbcrlf
result.WriteText " <description>" & escape_xml(system_description) & "</description>" & vbcrlf
result.WriteText " <type>computer</type>" & vbcrlf
result.WriteText " <icon>" & system_os_icon & "</icon>" & vbcrlf
result.WriteText " <os_group>Windows</os_group>" & vbcrlf
result.WriteText " <os_family>" & escape_xml(system_os_family) & "</os_family>" & vbcrlf
result.WriteText " <os_name>" & escape_xml(system_os_name) & "</os_name>" & vbcrlf
result.WriteText " <os_version>" & escape_xml(system_os_version) & "</os_version>" & vbcrlf
result.WriteText " <serial>" & escape_xml(system_serial) & "</serial>" & vbcrlf
result.WriteText " <model>" & escape_xml(system_model) & "</model>" & vbcrlf
result.WriteText " <manufacturer>" & escape_xml(system_manufacturer) & "</manufacturer>" & vbcrlf
result.WriteText " <uptime>" & escape_xml(system_uptime) & "</uptime>" & vbcrlf
result.WriteText " <form_factor>" & escape_xml(system_form_factor) & "</form_factor>" & vbcrlf
result.WriteText " <pc_os_bit>" & escape_xml(address_width) & "</pc_os_bit>" & vbcrlf
result.WriteText " <pc_memory>" & escape_xml(system_pc_memory) & "</pc_memory>" & vbcrlf
result.WriteText " <pc_num_processor>" & escape_xml(system_pc_num_processor) & "</pc_num_processor>" & vbcrlf
result.WriteText " <pc_date_os_installation>" & escape_xml(system_pc_date_os_installation) & "</pc_date_os_installation>" & vbcrlf
result.WriteText " <man_org_id>" & escape_xml(org_id) & "</man_org_id>" & vbcrlf
result.WriteText " <system_id>" & escape_xml(system_id) & "</system_id>" & vbcrlf
result.WriteText " <man_cluster_name>" & escape_xml(man_cluster_name) & "</man_cluster_name>" & vbcrlf
result.WriteText " <man_location_id>[PUT YOUR LOCATION ID HERE]</man_location_id>" & vbcrlf
result.WriteText " </sys>" & vbcrlf[/code]

Alternate LDAP only retrieval

[code] result.WriteText "<?xml version=""1.0"" encoding=""UTF-8""?>" & vbcrlf
result.WriteText "<system>" & vbcrlf
result.WriteText " <sys>" & vbcrlf
result.WriteText " <timestamp>" & escape_xml(system_timestamp) & "</timestamp>" & vbcrlf
result.WriteText " <hostname>" & escape_xml(system_hostname) & "</hostname>" & vbcrlf
result.WriteText " <man_ip_address>" & escape_xml(man_ip_address) & "</man_ip_address>" & vbcrlf
result.WriteText " <domain>" & escape_xml(computer_dns) & "</domain>" & vbcrlf
result.WriteText " <type>computer</type>" & vbcrlf
result.WriteText " <icon>" & escape_xml(icon) & "</icon>" & vbcrlf
result.WriteText " <os_group>" & escape_xml(os_group) & "</os_group>" & vbcrlf
result.WriteText " <os_family>" & escape_xml(family) & "</os_family>" & vbcrlf
result.WriteText " <os_name>" & escape_xml(os_name) & "</os_name>" & vbcrlf
result.WriteText " <windows_active_directory_ou>" & escape_xml(computer_ou) & "</windows_active_directory_ou>" & vbcrlf
result.WriteText " <last_seen>" & escape_xml(last_seen) & "</last_seen>" & vbcrlf
result.WriteText " <last_seen_by>active directory</last_seen_by>" & vbcrlf
result.WriteText " <system_id>" & system_id & "</system_id>" & vbcrlf
result.WriteText " <man_location_id>[PUT YOUR LOCATION ID HERE]</man_location_id>" & vbcrlf
result.WriteText " </sys>" & vbcrlf[/code]

You'll need to maintain your changes going forward unless the OpenAudit devs make this a script parameter like org_id.

Speaking of which org_id is not used when the script does an LDAP only audit. This probably qualifies as a bug.


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 06, 2015 6:18 am 
Offline
Newbie

Joined: Tue Nov 04, 2014 1:12 am
Posts: 9
Thank you so much it worked perfectly!

I would like another information.

I would like the User column was also in Group Locations

How do I add the User column in Group Location?

Group Locations:

[attachment=1] opengrupo.png
opengrupo.png [ 51.9 KiB | Viewed 11054 times ]


Group Windows Computers:

[attachment=0] opengrupoobj.png
opengrupoobj.png [ 174.77 KiB | Viewed 11054 times ]


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 07, 2015 1:50 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
This is possible but not that easy to change. At least it's more than I have time for.

If you want to do it yourself you can export the "Windows Computers" and "Items in <Your Group Name>" group definitions. Then copy-paste the Columns section of the "Windows Computers" export over the same section in your custom groups export. Then import the updated custom group definition back into OpenAudit.

I don't know of an easier way to do this. OpenAudit (right now) is not configuring the group column display database fields when I do anything using the web interface.


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 07, 2015 9:25 pm 
Offline
Newbie

Joined: Tue Nov 04, 2014 1:12 am
Posts: 9
[quote="jpa"]This is possible but not that easy to change. At least it's more than I have time for.

If you want to do it yourself you can export the "Windows Computers" and "Items in <Your Group Name>" group definitions. Then copy-paste the Columns section of the "Windows Computers" export over the same section in your custom groups export. Then import the updated custom group definition back into OpenAudit.

I don't know of an easier way to do this. OpenAudit (right now) is not configuring the group column display database fields when I do anything using the web interface.


Thanks for your help. I researched other topics in the forum, and could make the column appear in the group that I want.

I believe this just missing the SQL SELECT to the information appear, however this really I can not do.

have attached the XML Windows_Group and my Local Group customized, if you can help me create the SQL to feed the column Users would be very grateful.

[attachment=1] Windows_Group.xml [4.13 KiB]
Downloaded 553 times
[attachment=0] Customized_Group.xml [3.51 KiB]
Downloaded 566 times


[attachment=2] grupote_teste.png
grupote_teste.png [ 189.48 KiB | Viewed 11013 times ]


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 08, 2015 3:57 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
It probably would have been easier to just cut and paste the correct columns from an example with a proper display sql query.

Not tested but try the attached.


Attachments:
Customized_Group.xml [4.11 KiB]
Downloaded 590 times
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.  [ 6 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:  
cron
Powered by phpBB® Forum Software © phpBB Group