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 Sat Apr 20, 2024 2:35 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: My patches to Open-AudIT
PostPosted: Wed Aug 29, 2007 8:10 pm 
Offline
Newbie

Joined: Wed Aug 29, 2007 5:24 pm
Posts: 6
Hello everybody
my name is Claudio and, when some days ago I found Open-AudIT, I immediately installed it at work.
I really like it's no-agent approach is great, not requiring clients to be "deployed".

Well, using it I found some things not working the way I like, so I patched sources to fit my needs and now it's the time to share my little work with you.
Since I don't have SVN access, I'm posting my patches here.

- Annoying DOMAIN\UserName format
I have only one domain (with a quite long name) and usernames are in "name.surname" format, so the complete DOMAIN\name.surname becomes too long.
I added a remove_domain_from_username parameter in audit.config:
[code]
' remove domain part from username and make it lowercase (y/n)
remove_domain_from_username = "y"
[/code]

Than a little patch to audit.vbs:
[code]
For Each objItem in colItems
net_domain = objItem.Domain
net_user_name = objItem.UserName
If remove_domain_from_username = "y" Then
' formatting username (remove domain and make all lowercase)
net_user_name = lcase(net_user_name)
sep = instr(net_user_name, "\")
If sep > 0 Then
net_user_name = Mid(net_user_name, sep + 1)
End If
End If
Next
[/code]

- Optionally scan for floppy drives
Even if modern PCs are missing floppy drives, some of my PCs have it and, during the audit, the floppy drive makes some noise alerting my users.
After a few helpdesk calls from them, I added a new floppy_detect config variable to audit.config:
[code]
' detect floppy drives (y/n)
floppy_detect = "n"
[/code]
Then another little patch to audit.vbs:
[code]
'''''''''''''''''''
' Floppy Drives '
'''''''''''''''''''
If floppy_detect = "y" Then
comment = "Floppy Drives"
if verbose = "y" then
wscript.echo comment
end if
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_FloppyDrive",,48)
For Each objItem In colItems
form_input = "floppy^^^" & clean(objItem.Description) & "^^^" _
& clean(objItem.Manufacturer) & "^^^" _
& clean(objItem.Caption) & "^^^" _
& clean(objItem.DeviceID) & "^^^"
entry form_input,comment,objTextFile,oAdd,oComment
form_input = ""
if online = "p" then
oIE.document.WriteLn "<tr bgcolor=""#F1F1F1""><td>Floppy Drive: </td><td>" & clean(objItem.Caption) & "</td></tr>"
end if
Next
End If
[/code]

- Some clients hangs on Printer Info step
Don't know why, but since I don't mind printer infos, I added a new printer_detect config variable:
[code]
' detect printers (y/n)
printer_detect = "n"
[/code]

Then another little patch to audit.vbs:
[code]
'''''''''''''''''''''''''''
' Printer Information '
'''''''''''''''''''''''''''
If printer_detect = "y" Then
comment = "Printer Info"
[/code]

I'm ready to send my patched files if you think my patches were usefull.
NOTE: I've formatted the audit.config file to match some *nix style, like:
[code]
' This parameter does this and that
' values: (y/n)
parameter = "n"
[/code]
this way the file is quickly self-explanatory.
Hope you use this format in the future, saving us to guess what options mean.

Thanks for your great work.
Claudio

_________________
Claudio Nicora
http://coolsoft.altervista.org


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 10, 2007 8:20 pm 
Offline
Newbie

Joined: Wed Aug 29, 2007 5:24 pm
Posts: 6
A lot of views but no replies to my message... :(

Come on guys, is there anybody going to write-down his thoughts about my patches? :oops:
Let me know what you think about it.

Regards
Niko

_________________
Claudio Nicora
http://coolsoft.altervista.org


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 11, 2007 2:13 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Ooops, was too busy over the last few days.

Looks good, but I will be out and about for the rest of the week, so I wont have time to test.

Does the fix for the noisy floppy drive meet with the approval of the guys working on this issue on the bugs forum?

The domain issue, I will need to examine more closely, this looks neat, but I'll need to try it and see, since a lot of the remote management stuff relies on the domain to function correctly, and I have several domains.

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


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