LDAP AD and OU= with a blank

First,
Platform: Windows , APEX 4.0.2, DB 10g Rel 2
I am using custom LDAP for MS Active Directory.
I have to search two user groups (ou), but one of the user group contains a blank, "PANYNJ Users", and the other one is pausers. Currently, I first search pausers and when it is not found, I search "PANYNJ Users". It fails for those users in the "PANYNJ Users" group. I believe it is because it has a blank, and therefore doesn't recognize my search base.
Here is my code:
The global variables are declared as such:
create or replace
PACKAGE      "LDAP" as
     g_host              constant varchar2(255)   := 'TELEIS30.pacorp.panynj.gov';
  g_port          constant NUMBER          := 389;
  g_search_base1   constant VARCHAR2(255)   := 'ou=pausers,dc=pacorp,dc=panynj,dc=gov';
  g_search_base2   constant varchar2(255)   := 'ou=PANYNJ Users,dc=pacorp,dc=panynj,dc=gov';
  g_search_filter constant varchar2(255)   := 'cn=';
     g_exact_dn      constant boolean              := false;
     g_use_ssl       constant boolean              := true;
FUNCTION VOIP_AUTHENTICATION (p_username IN VARCHAR2, p_password IN VARCHAR2) RETURN boolean;
FUNCTION authenticate(p_username IN VARCHAR2, p_password IN VARCHAR2,p_search_base0 IN VARCHAR2)
    RETURN BOOLEAN;
function get_ldap_attribute (p_username IN VARCHAR2, p_password IN VARCHAR2) return varchar2;
procedure GetAllUserAttributes (p_Username in varchar2, p_Password in varchar2);
procedure GetUserAttributes (p_Username in varchar2, p_Password in varchar2, p_attr in varchar2) ;
end ldap;The function is as follows:
FUNCTION VOIP_AUTHENTICATION (p_username in varchar2, p_password in varchar2) return boolean is
v_dummy varchar2(1);
v_boolean boolean;
    l_email VARCHAR2(100);
cursor c_access is  SELECT 'X' FROM VOIP.apex_access_control where admin_username = p_username;
-- authenticate
BEGIN
-- authenticate the user
BEGIN
v_boolean := voip.ldap.authenticate(p_username , p_password ,ldap.g_search_base1);
IF v_boolean
THEN
   null;
ELSE
   VOIP.VOIP_PKG.CREATE_DEBUGGING ('VOIP_AUTHENTICATION',p_username ||'- after authentication - FAILED1');
   v_boolean := voip.ldap.authenticate(p_username , p_password ,ldap.g_search_base2);
   IF v_boolean
   THEN
       VOIP.VOIP_PKG.CREATE_DEBUGGING ('VOIP_AUTHENTICATION',p_username ||'- after authentication - SUCCESS2');
    ELSE
       VOIP.VOIP_PKG.CREATE_DEBUGGING ('VOIP_AUTHENTICATION',p_username ||'- after authentication - FAILED2');
    END IF;
END IF;
exception
when others then
return false;
end;
IF  v_boolean THEN
-- make sure that the username is on the access table
BEGIN
OPEN c_access;
fetch c_access INTO v_dummy;
IF c_access%FOUND THEN
   close c_access;
   RETURN TRUE;
ELSE
   VOIP.VOIP_PKG.CREATE_DEBUGGING ('VOIP_AUTHENTICATION',p_username ||'- after c_access - FAILED');
   close c_access;
   RETURN FALSE;
END IF;
exception
when others then
return false;
end;
   ELSE
        NULL;
  commit;
  return false;
   END IF;
   EXCEPTION
    WHEN others THEN
      return false;
END VOIP_AUTHENTICATION ;How can I make the package recognize PANYNJ Users user group?
THIS IS A PRODUCTION PROBLEM NOW. (The users said it was working, so I put in production not realizing it doesn't work for all users.).
Robert
http://apexjscss.blogspot.com

Hello gurus,
Bumped...
Any gurus experienced in LDAP out there? PLEASE HELP!!!
Robert
http://apexjscss.blogspot.com

Similar Messages

  • I am trying to install Adobe Reader my wife's laptop but "installer" hangs up and fails with a blank black screen. The machine is capable and has a Vista OS. My wife blames the machine and wants to "throw it out." She's an idiot but I need to get this fix

    I am trying to install Adobe Reader my wife's laptop but "installer" hangs up and fails with a blank black screen. The machine is capable and has a Vista OS. My wife blames the machine and wants to "throw it out." She's an idiot but I need to get this fixed.

    run the cleaner (Download Adobe Reader and Acrobat Cleaner Tool - Adobe Labs) and then retry installing.

  • I downloaded the trial version of LR 5 just to get a feel of LR 5. However, now that I have bought it, it has all my photos in a mess and I need to delete all photos and start with a blank LR...Help!

    How do I save my photos and then reimport them??

    You can create a new catalog which will be empty File->New Catalog. There is no SAVE command in Lightroom, so in general you don't need to SAVE your photos. If you have done some editing of the photos, and you want that to show up in the new catalog, select the photos and then Ctrl/Cmd-S to save the metadata with the photos.
    If all your photos are "in a mess" (whatever that means), you might consider learning how to organize in Lightroom by getting rid of that mess using Lightroom methods. But generally, if you are beginning and your photos are all "in a mess", then creating a new catalog and importing again will result in the same mess. You would need to identify what you did wrong, and fix that.

  • Had iphone backed up to itunes on Mac Book Pro. water destroyed mac. downloaded new itunes on PC. want to sync iphone to itunes on PC. When clicking sync a pop up asked if I'm sure i want to erase what is on my iphone and sync with a blank itunes! No!Help

    How do I sync my phone to a new blank Itunes without erasing the data on my iphone?

    iTunes now gives you the option to install previous purchases on your devices. Sign in to your iTunes account on your computer and go to the iTunes store. Once there, click on the purchased link on the right side of the store screen. It will take you to a screen that shows all of your previous iTunes purchases. Music, TV shows, Movies... Download whatever you want on your new computer. If that isn't an option you want to try then plug you iPhone into your computer and open iTunes. When your phone shows up in iTunes, click on it. At the bottom of the screen you should be able to select the option to manually transfer music. Then select the music you want from your phone and copy it over to your computer. At this point if you aren't logged in to your iTunes account you will be asked to sign in to play the songs. Hope this helps.
    -Luke

  • XP Mode starts up with "Could not enable integration features" and loads with a blank screen.

    The XP Mode virtual machine comes up with a big blue screen with no programs loaded after the "could not enable integration features" dialog box.  How to recover? 

    Hi,
    As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as ‘Answered’ as the previous steps
    should be helpful for many similar scenarios. If the issue still persists, please feel free to reply this post directly so we will be notified to follow it up. You can also choose to unmark the answer as you wish.
    BTW, we’d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems. Thanks for
    your understanding and efforts.
    Alex Zhao
    TechNet
    Subscriber Support in forum.
    If you have any feedback on our support, please contact
    [email protected]
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • I just purchased a mac air and am unable to get my entire music library and pictures moved from my iPhone.  I subscribed to match and it wants to delete everything on my iPhone and replace with nothing from the new computer  How do I get my music and pict

    I just purchased a mac air and cannot figure out how to get my pictures from my toshiba windows to the air into iphoto and I also cannot get my library of music and apps to get to the mac air as well.  Each time I try to synch it tells me it will repace my ipad and iphone with the blank library from the new air.  How do I get my music, apps and photos to the air.  I just subscribed to imatch and it charged me and only has 600 of my 2,000 songs!

    You must move your photos and music from your Toshiba to your MBA directly, not using the iPhone. The Migration Assistant app on your Mac will help.

  • T430 own't boot. 4 short beeps with a blank screen.

    hi guys,
    I got a very weired problem that my machine keeps beeping and accompanied with a blank screen. However, all BIOS hardware tests have passed and it just own't boot with any device CD, Hard Driver  or a bootable USB HDD...
    then I found this on official support weisbte:  Four cycles of four short beeps and a blank screen - System board (Security chip)
    Does this mean a motherboard replacement is the only way to address mt problem? if so, unfortunately, my warranty has just expired two month ago...so I just want to know is there a way to address this to save me some $$...
    Any advices would be highly appreciated.
    Jason

    Hi JasonZ,
    Welcome to Lenovo Community!
    I am sorry to hear that you are facing a blank screen issue with beep sound on ThinkPad T430.
    As you have mentioned the issue about the beep it is related with system board security chip.  
    Either replace the system board or (i don't know whether it is possible) let replace and rewrite new the security-chip by a professional. 
    Please click here to know the complete details on beep sound issue.
    I strongly suggest you to visit the nearby service center for further assistance on the issue.
    Click here to open a link where you can select the country and get the exact contact support number. I’m sure they will be a great help.
    Hope this helps! 
    Best regards,
    Hemanth Kumar
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • What to do if it freezes with a blank screen

    Tried to restart the mac pressing CMD+Opt+On/Off then pressing CMD+R+On/Off with the restart sound going off. However, it still freezes with a blank screen. All control buttons such as brightness and volume do not work at all. After waiting for few seconds, it ask me to press Return key if i wanted to put english as my language which i did and still with a blank screen. A few seconds later, the edges around the keyboard became hot. Then i tried to restart it the same process a few times, still the same results. This happened right after i login into my account.

    http://support.apple.com/kb/ht1343
    http://support.apple.com/kb/HT5869
    Restart shortcut keys
    control + command + power/eject

  • I connected an external monitor to my MacBook Pro, but it doesn't open any programs. It Just sits there with a blank screen.  How do I get it to open programs and act like a monitor?

    I connected an external monitor to my MacBook Pro, but it doesn't open any programs. It Just sits there with a blank screen.  How do I get it to open programs and act like a monitor?

    Dear Jean:
    It sounds like you are trying to get your external monitor to act as the primary viewing screen. For example it would have your Doc, Icons, Etc. In order to make the external monitor the primary screen you have to:
    Open System Preferences.
    Choose the Displays Icon
    There will be several tabs to choose from pick Arrangement
    Drag the toolbar to desired display
    Let me know if this helps at all!
    Lance

  • When I bring up my Mozillafirefox, all I get is a window with a blank white screen. (I 'reinstalled' Firefox 3.66 about a month and a half ago, (and lost all my bookmarks as a result therein), and hope I can get my firefox back this time without having t

    When I bring up my Mozillafirefox, all I get is a window with a blank white screen, (and the firefox logo). (After using Firefox very happily for over a year, I had to 'reinstall' Firefox 3.66 about a month and a half ago, (and lost all my bookmarks as a result therein), and hope I can get my firefox back this time without having to reinstall. Mozilla Firefox is still listed as one of my active programs). HELP! Is there a way to get my firefox back without reinstalling? Many thanks!
    == This happened ==
    Every time Firefox opened
    == June 30, 2010 ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)

    same problem. wtf. just happened one day when i went to use it. nothing out of the ordinary installed either....

  • The application maps is not working. When I try to run it opens for a few seconds with a blank screen and then closes

    The application maps is not working. When I try to run it opens for a few seconds with a blank screen and then closes.

    Try a reset by pressing the home and sleep buttons until you see the Apple logo, ignoring the slider. Takes about 5-15 secs of button holding and you won't lose any data or settings.

  • EDSPermissionError(-14120) problems with LDAP, SSL and Directory Utility

    Hello everyone,
    Apologies for the repost but I think I may have made a mistake by posting this originally in the Installation, Setup and Migration forum instead of the Open Directory forum. At least I think that may be why I didn't receive any responses.
    Anyway, I've been trying to get my head around Open Directory and SSL as they are implemented in Mac OS X Server 10.5 Leopard, and have been having a few issues. I would like to set up a secure internal infrastructure based around a local Certificate Authority that signs certificates for other internal services like LDAP, email, websites, etc.
    I only have one Mac OS X Server and it is kind of a small office so I have gone against best practice and simply made it a CA (through Keychain Utility). I then generated a self-signed SSL certificate through Server Admin, and used the "Generate CSR" option to create a Certificate Signing Request. This went fine, but I did have some problems signing it with the CA, because the server documentation suggested that once I signed it it would pop open a Mail message containing the ASCII version of the signed certificate - it did not, and it took me a loooong time to realize that I could simply export the copy of the signed certificate it put in my local Keychain on the server as a PEM file and paste this back into the "Add Signed or Renewed Certificate from Certificate Authority" dialog box in Server Admin. Hopefully this can be fixed in a forthcoming patch, but I thought I would mention it here in case anyone else is stuck on this issue.
    Once I did this I was able to use this certificate in the web server on the same machine and sure enough I was able to connect to it with with clients who had installed the CA certificate in their system Keychains without getting any error messages - very cool.
    However, I haven't had quite as much luck getting it going with LDAP/Open Directory. I installed the certificate there as well, but have run into a number of problems. At first I could not get clients (also running 10.5.2) to talk to the server at all over SSL, receiving an error in Directory Utility that the server did not support SSL. I eventually discovered that the problem seemed to lie in the fact that the OpenLDAP implementation on Leopard is not tied in with the system Keychain, necessitating some command-line voodoo to install a copy of the CA cert in a local directory and point /etc/openldap/ldap.conf at it, as documented here: http://www.afp548.com/article.php?story=20071203011158936
    This allowed me to do an ldapsearch command over SSL, and seemingly turn SSL on on clients that were previously bound to the directory, and additionally allowed me to run Directory Utility on new clients and put in the server name with the SSL box checked and begin to go through the process of binding. Once this seemed to work, I turned off all plaintext LDAP communication and locked down the service by checking the "Enable authenticated directory binding," "Require authenticated binding," "Disable clear text passwords," and "Encrypt all packets" options in Server Admin. However, I am now running into a new problem, specifically that I cannot successfully bind a local account to a directory account over SSL.
    Here's what happens:
    1) I run Directory Utility, (or it auto-runs) and add a server, typing in the DNS name and clicking the SSL box.
    2) I get asked to authenticate, and type in user credentials, including computer name (incidentally, should this be a FQDN or just a hostname?)
    3) Provided I put admin credentials in here and not user-level credentials, I get taken to the "Do you want to set up Mail, VPN, etc.?" box that normally appears when you autodiscover or connect to an Open Directory server.
    4) I click through, and am asked for a username and password on the server, as well as the password for my local account.
    5) When I put this information in, I get a popup with the dreaded "eDSPermissionError(-14120)" and it fails.
    Checking the logs in Server Admin reveals nothing special, and while I have seen a couple other threads on this error and various other binding problems:
    http://discussions.apple.com/thread.jspa?messageID=5967023
    http://discussions.apple.com/message.jspa?messageID=5982070
    these have not solved the problem. In the Open Directory user name field I am putting the short username. I have tried putting [email protected] and the user's longname but this fails by saying the account does not exist. For some reason it does seem to work if I bind it to the initial admin account I created, but no other user accounts.
    If I turn all the encryption stuff off I am able to join just fine, so I am suspecting that the error may lie in some other "under the hood" piece of software that doesn't get the CA trust settings from the Keychain or the ldap.conf file, but I'm stymied as to which piece of software this might be. Does anyone have any clues on what I might be able to do here?
    Thanks,
    Andrew

    Hard to tell what is happening without looking at the application
    source, knowing what OS & hardware you're using etc. You might want to
    try running with different JVM versions to see if it's actually the VM
    that is the problem. If you have a support contract with BEA you could
    ask support to help you diagnose this.
    Regards,
    /Helena
    Ayub Khan wrote:
    I have an application running on Weblogic 8.1 ( with JRockit as the JVM). This
    application in turns talks to an iPlanet Directory server via LDAP/SSL. The problem
    seems to happen on loading the machine..the performance progressively gets worse
    and after a couple of seconds, all the threads stop responding. I checked the
    heap, cpu and the idle threads in the execute queue and there is nothing there
    to trigger alarms...there are quite a few idle threads still and the heap and
    the cpu utilization seem OK. On doing a thread dump, Is see that all the other
    threads seem to be in a state where they are waiting for data from LDAP and it
    is basically read only data that they are waiting on.
    Does anyone know what it is going on and help point me in the right direction.
    -Ayub

  • I no longer have access to system folders that allow me to remove old or incorrect PAGES templates. Need to find out how to do that. The only way I can do it now is to blank the template and replace the bad template with a blank.

    I no longer have access to system folders that allow me to remove old or incorrect PAGES templates. Need to find out how to do that. The only way I can do it now is to blank the template and replace the unwanted template with a blank. It was previously possible to go to MY TEMPLATES and remove the unwanted templates. I don't if this issue is before or since installation of 10.8 (a nightmare in my case, which led to significant failure issues).  And because I haven't tried to remove templates since finally managing to install 10.8 (now at 10.8.4), I don't know if this is typical of the newer OS or a problem. I've been a Mac user for more than 25 years, but I think I'm nearing the end of the road. By the way, I've never needed to do this before because the manuals always offered an answer... they don't seem to do that anymore. In any case, I don't know how this works... I'd prefer an email reply if that's possible. But that would probably be too easy, and I don't know how to get a reply.

    Thanks, I appreciate the help.  I think this is one of the problems Apple is creating by changing the OS so often. I had fomer colleagues at [a major aerospace contractor] who told me that so many original files were ultimately lost because of the deadly change in the "Save As" operation that they are now afraid of every OS update. Apple has badly damaged their support base with that very prominent company (they won't update now until they've fully examined and understand changes in the pre-conditioned nature of OS computer functions), and they are a whole lot less enthaled with Mac-related equipment/software. Can't blame them, I too used orginal files that way (as easy-to-use templates), and lost some important files before I realized what was happening (to late to revert). Companies should not have to retrain employees each time an OS gets an update, it's can be very expensive several different ways. They learned a painful lesson with that one. And because I'm now retired and don't use multiple devices, I need iCloud like I need a hole in the head... but I'm told there's no way to keep Apple out of my computer. Fortunately, because of major problems when initially installing Mountain Lion, one hold-over of the hardware/software damage I experienced was that iCloud can no longer access my computer even though everything else is working fine again. That was the only "good luck" I had as a result of that expensive nightmare.

  • Ever since upgrading to Mountain Lion, my AOL messages sometimes, but not always open with a blank page. If I open AOL in Firefox, the messages open fine.  This does not happen with any messages by any means, and it is not any type of certain message

    Ever since upgrading to Mountain Lion, my AOL messages sometimes, but not always open with a blank page. If I open AOL in Firefox, the messages open fine.  This does not happen with any messages by any means, and it is not any type of certain message. In fact, in the same screen I can often open an email from the same sender with email intact. This is weird. Sometimes I close the page and open a new page. Sometimes that works and sometimes it does not. It is a very annoying thing.

    Hi,
    When you start Messages fro the first time you are asked for an Apple ID
    When this is verified and entered it appears in Messages Menu > Preference > Accounts and is Enabled.
    The App should have also picked on on those iChat Accounst you had before.
    These should be Enabled if they were when you last used iChat.
    Exactly which "Accounts" are logged in can be seen in Message Menu > Accounts and will include the iMessage "Account" and Bonjour.
    In the Window menu you will see CMD +0 for the Messages window and CMD+1 for the "Buddies" window which is a combined list at this stage.
    Go to the Preferences > General Section and Untick the "Collect all accounts into one list".
    This will give you separate iChat type Buddy lists.
    You can check if that account/Buddy list is set to Invisible or if in the Preferences > Accounts > Security you have settings that will block some people from seeing you as On line.
    You are saying Buddies can see you as On Line which implies they are still sending to your AIM based Names (@Mac.com is a valid AIM Screen Name)
    I am not sure from your post if you are trying to iMessage their email IDs thinking they are Apple IDs and that they are using Messages as well.
    There is no Buddy list for iMessages side
    No-one can tell you are "On Line" until they have your details in the "To" spot in Messages with the correct iMessaged contact info (iPhone Number or Apple ID)
    Obviously an Apple ID can be an email or look like one.
    In some cases they are also valid AIM Screen Names as well.
    In the case or the @mac.com name you may have linked this Apple ID to iMessages as well.
    11:31 PM      Saturday; August 11, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Creating a template in Pages is straight-forward as answered here previously. Is there and equivalent for iBooks Author which can start with a blank page and build up the template as required? or can one only adapt a ready made template?

    Creating a template in Pages is straight-forward as answered here previously. Is there an equivalent for iBooks Author which can start with a blank page and build up the template as required? or can one only adapt a ready made template? This has proved unsatisfactory to me so far. Lines are left in etc.

    There are two basic menus for fonts - one from the main menu bar and one from the toolbar. You can also bring up the font manage dialog.
    I don't recommend trying to hard to force an otherwise foreign font, as it inevitably needs to be usable/supported on iOS as well, and that can get tricky w/3rd party fonts, as an example, even with the expanded font support in the latest iBA.
    If you need to discuss fonts more, I suggest starting a new thread....preferably with a slightly more brief title, thanks.

Maybe you are looking for

  • Error SAPMF05A 0700 E - while clearing document in F.13

    Hi All, While running the automatic clearing through t.code F.13. Getting the following error. ScName       Scr. Mtyp Mid Mno  Message text SAPMF05A 0131 S      F5  074  4 items were selected SAPMF05A 0700 E      /DS 310  Please Enter Valid Trading P

  • A problem using importFileInto

    Hi, I'm trying to import a flash file (swf extension) for a Director project (MX 2004) but when it is within the "cast" sometimes appears with the original extension ("width." 595, "height" 842) and others with 320x240 (in particular it always). I ha

  • Delaying Voicemail from activating

    Is it possible to delay my iphone(4) from diverting to voicemail so that it rings for longer?

  • Jtree expandPath is not working

    Hi All, I am performing following opertion on jtree First i am taking path of selected jtree node. i am updating jtree then i am trying to expand jtree on the basis of selected path. but it is not getting expanded at all.pls help code ---> TreePath t

  • Newbie to iPhoto - Can anyone help with a few questions?

    Hi everyone, I have had iPhoto since December and I love it. I have been able to naviagate around it pretty well and love the fact I can put names to faces. I own a childcare business so this helps me individualise each child's photo's which I put on