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 Mar 29, 2024 2:27 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Fri Jul 06, 2012 6:03 pm 
Offline
Newbie

Joined: Fri Jul 06, 2012 2:11 am
Posts: 1
First off, thank you for building this software - it fits what I needed here perfectly. :)

I've started testing OAv2 at my site and I ran into a little problem with the audit script (v8_2) due to our naming conventions. I've listed the problem and my quick hack below in case anyone finds it useful.

Here, the CN of a user object is usually named in the format <Forename>, <Surname>. This causes problems when the script tries to generate a base DN from the current user's DN by splitting on commas.

Since the purpose of that section is to simply strip out the User's CN portion from the string I worked around it as follows:

At around line 723:
[code]strUserDN = Replace(strUserDN, "/", "\/")[/code]
Insert this after:
[code]
if inStr(strUserDN(",OU=")) > 0 then
delimtmp = ",OU="
elseif inStr(strUserDN(",DC=")) > 0 then
delimtmp = ",DC="
else
delimtmp = ","
end if
[/code]
And amend the following 3 lines:
[code]
stemp = split(strUserDN, delimtmp)
stemp(0) = ""
ttemp = join(stemp, delimtmp)]
[/code]

The script has been working perfectly for me since that change when run against accounts with and without commas in their CNs. There's probably a better way (maybe with RegExs?) but this was good enough for my purposes!


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.  [ 1 post ] 

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