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 Thu Mar 28, 2024 8:16 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
PostPosted: Fri Oct 14, 2011 2:02 am 
Offline
Newbie

Joined: Fri Oct 07, 2011 6:42 am
Posts: 12
Hello there,

Need your help how I can pull the data upon audit_linux.sh being executed that system_os_arch column in the system table will be populated with the information being audited by Open-AudIT. I appreciate if you could guide me what php file or related files to edit for me to be able to populate the OS Arch in the system_os_arch fieldname.

Very much appreciated for your help and guidance.

Cheers,

Lawrence


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 14, 2011 3:36 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
Make sure you're on the latest version of [url=http://www.open-audit.org/phpBB3/viewtopic.php?f=8&t=2414#p17091]OpenAudit v1 from SVN[/url]

Patch the audit_linux.sh as follows. Don't use this patch as-is because BBCode eats some necessary spaces. I'll attach the patch and audit script as well.

Make sure to test this as I don't have any Linux machines to test on.

[code]
Index: audit_linux.sh
===================================================================
--- audit_linux.sh (revision 1251)
+++ audit_linux.sh (working copy)
@@ -1016,6 +1016,7 @@
# Operating System
name=$($oa_uname -s)
version=$($oa_uname -r)
+architecture=$($oa_uname -m)

# If lsb_release is available, use that to get the OS info. Fallback on release files otherwise.

@@ -1407,7 +1408,7 @@
mount_point=$($oa_awk '/ \/ /{print $1}' /etc/mtab)

echo "system03^^^$mount_point^^^$version^^^Linux^^^$distribution^^^$country^^^$os_release^^^\
-$os_install^^^ ^^^ $os_lang ^^^ ^^^$system_serial^^^$system_srvpack^^^$version^^^^^^$os_lastboot^^^" >> $ReportFile
+$os_install^^^ ^^^ $os_lang ^^^ ^^^$system_serial^^^$system_srvpack^^^$version^^^^^^$os_lastboot^^^$architecture^^^" >> $ReportFile
# Missing - Description
# - Organisation
# - Registered User
[/code]


Attachments:
audit_linux.sh.txt [89.5 KiB]
Downloaded 350 times
audit_linux.patch.txt [891 Bytes]
Downloaded 344 times
Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 14, 2011 5:17 am 
Offline
Newbie

Joined: Fri Oct 07, 2011 6:42 am
Posts: 12
Hello jpa,

You're such a GREAT HELP to me. DONE!

Thank you so much :D

Issue RESOLVED!

Cheers! and More Power to OA! :D

Lawrence


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 14, 2011 5:34 am 
Offline
Newbie

Joined: Fri Oct 07, 2011 6:42 am
Posts: 12
Hello jpa,

In addition to the Resolution, I also vi the following filename, as shown
/var/www/html/open-audit/trunk/admin_pc_add_dir.php

and appended (in bold) the below func

function insert_system03 ($split){
global $timestamp, $uuid, $verbose;
:
$system_registered_user = trim($extended[10]);
$system_serial_number = trim($extended[11]);
$system_service_pack = trim($extended[12]);
$system_version = trim($extended[13]);
$system_windows_directory = trim($extended[14]);
$system_os_arch = trim($extended[15]);
$sql = "UPDATE system SET system_boot_device = '$system_boot_device', system_build_number = '$system_build_number', ";
$sql .= "system_os_type = '$system_os_type', system_os_name = '$system_os_name', ";
$sql .= "system_country_code = '$system_country_code', system_description = '$system_description', ";
$sql .= "date_system_install = '$date_system_install', system_organisation = '$system_organisation', ";
$sql .= "system_language = '$system_language', system_registered_user = '$system_registered_user', ";
$sql .= "system_serial_number = '$system_serial_number', system_service_pack = '$system_service_pack', ";
$sql .= "system_version = '$system_version', system_windows_directory = '$system_windows_directory', system_os_arch = '$system_os_arch' ";
# $sql .= "system_version = '$system_version', system_windows_directory = '$system_windows_directory' ";
$sql .= "WHERE system_uuid = '$uuid' AND system_timestamp = '$timestamp'";
if ($verbose == "y"){echo $sql . "<br />\n\n";}
$result = mysql_query($sql) or die ('Insert Failed: ' . mysql_error() . '<br />' . $sql);
}

Once again, thank you so much for your help. Posted you again if there's some clarfication. Sorry for bugging you :D

Lawrence


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 14, 2011 6:06 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
No problem. The admin_pc_add_dir change should have been in the SVN1251 update which is why I didn't include it.


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