Hiding users from anonymous searches

Hi,
I am trying to hide certain users from anonymous searches. To be specific, I don't want certain users to show up in global address book searches from UWC and/or outlook or other anonymous searches. It was suggested on another forum to add an attribute like privateuser=true for those users and then build an ACI to not display them for anonymous searches. Could anyone provide some advice on how to build such an ACI.
Thanks,
Darren

(targetattr = "*") (target = "ldap:///ou=testOU,dc=pooh,dc=com") (targetfilter = privateuser=true) (version 3.0;acl "testACI";deny (all)(userdn = "ldap:///anyone");)

Similar Messages

  • Hiding users from Global Address List in Exchange 2010

    I am attempting to hide users no longer in our company from our GAL.  I have been trying to do this through Active Directory.  I verified the 'hide from Exchange address list' in AD is checked for these users, but they still shows up.  On
    my own PC I deleted the *.oab files and downloaded the offline address book again, but it still shows.  I also checked OWA and they show in there as well.
    Is there anywhere else that would hold these?  I have searched but could not find much related to this.  We are running Exchange 2010 SP1.
    Any help would be appreciated.

    How to Hide Users From GAL
    http://pdtechguru.wordpress.com/2012/10/26/how-to-hide-users-from-gal/

  • Restrict users from saving own search in existing Named Searches

    Hello,
    I have created some Named Searches that will be used by the MDM users. These users are only allowed to use these named searches (in their search selections) but they are not allowed to 'overwrite' any of the named searches by their own search criteria.
    How can I prevent the user from 'overwriting' the Named Searches? 
    Because even when I set the user role to "None" for all functions and "Read-Only" for all tables and fields, the user can still make their own search and Save that as Named Search (and thus 'overwriting' the existing Named Search which impacts also the other users that make use of these Named Searches).
    We are using MDM 5.5 SP5 (5.5.42.106).
    Or is this an autorisation bug in MDM?
    Thanks for your answers!
    Regards,
    Marcel

    All,
    Just for your information:
    We have upgraded to MDM 5.5 SP06 Patch 3 (build 5.5.63.57) and they have introduced new role feature to protect named searched to be overwritten (see also release notes of patch 3 - OSS Note 1234675).
    So you can now change the Role (in MDM Console) and under section MDM Data Manager, you can set None or Execute for the function of Saving a Named Search.
    If you set it to None, then the menu option in the MDM Data Manager of saving an search as a Named Search (and hence overwriting the named search) is greyed out. Only when you set it to Execute (which is automatically set during upgrade to thi snew version when the role has set it's Default function to Execute), then the user can overwrite the named search with his own search.
    So, issue solved!
    Regards,
    Marcel

  • Hiding Topics From Search Results

    I have about 7 different types of users that require
    different and private set of documentation. My plan is to use
    conditional build tags to deliver a help set for each user. I'm
    delivering noncontext-sensitive help and via batch processing.
    Later I'll ensure that each help set is context-sensitive, and have
    the product call the correct one. I'm trying uncover flaws in my
    architecture. I'd like to streamline if possible.
    What's cool is that my product's interface has built-in
    profiling, so the product already knows what windows/tabs (context)
    the user can access. Seems like a perfect way to deliver
    context-sensitive help for all my users. But, can I do so with just
    ONE help set?
    I can disable TOC, but one thing I can't figure out: How
    would I prevent users from seeing private content launched via the
    search engine? I'm just trying to figure out how to use only one
    help set and still restrict content. Unlikely, right?

    There's another way to do this:
    1. Move all the screen capture topics to a new (secondary)
    project.
    2. Create a new CHM file from the secondary project.
    3. In your primary project, open each link to a screen
    capture image. In each case, the Hyperlink dialog will appear.
    4. Open the
    Link to drop-down menu, and then select
    Remote Topic.
    5. Navigate to the secondary CHM file.
    6. Select the desired topic from the secondary CHM file.
    7. When you are finished, generate a new CHM file from your
    primary project. The secondary topics will
    not appear in your search results.
    I found this in the RH Help files or the Knowledge Base; I
    don't remember which. Also, if you don't want to repeat these steps
    for each link, you can edit one link, copy the code from the
    TrueCode pane, and use a find-and-replace feature to replace the
    old code with the new target. That should cut down the time
    tremendously.
    (FWIW, I use drop-down hotspots when I show such captures at
    all.)

  • Protect the adf url from anonymous users

    Hi All,
    How can i protect my adf application url from anonymous users?Please give me your valuable suggestions.

    Have you read about ADF Security in the documentation?

  • USER from dual says ANONYMOUS

    Hi!
    There is someting I don't understand. In web browser SQL Command tool i write
    select user from dual;
    and I get
    USER
    ANONYMOUS
    1 rows returned in 0,04 seconds CSV Export
    Why is that? I'm login as HR. With SYSTEM is the same.
    When I use sqlplus.exe (command line tool), everething is correct.

    USER is the database user that created the current database session, in this case, it is the user account used by the Embedded PL/SQL Gateway to connect your web request through to the database. Your authentication as HR within the Application Express facility took place long after that session was created. To query that value: select v('APP_USER') from dual;
    Scott

  • The way SharePoint open office documents will differ if the user try to open them from the document library directly, or if users try to open the document from the search result page.

    I have a document library where I have uploaded an excel sheet to it. Now If I click on the excel sheet directly from the document library page , I will get the following error ““The webpage cannot be displayed””. While if I do a search and I open the excel
    sheet from the search result page , it will open the excel sheet using the excel services inside the browser !!.
    So can anyone advice on this ?
    Also if I have a PowerPoint document , and I try to open it from the document library I will get the following error “The webpage cannot be displayed” , and the URL will be prefix with the following “ms-powerpoint:ofv|u|”. while if i do a search and i open
    the PowerPoint from the search result page i will be prompted to either open or save the document ? So why SharePoint is reacting totally different when trying to open document library items from the document library Or from the search result page?

    Hi,
    The behavior in the document library could be probably because of the Documents handling setting. Please try setting it to default behavior (Open in browser) as i hear from you that the default behavior is to open from browser.
    Thanks, Suneetha
    Currently I have set the following;-
    1. On the library advance setting :- I define  “Open in the client application”
    2. On the web application setting:- I define stricked for Browser File Handling
    And I have noted if I delete the browser cache and I access the document , then I will be prompted with the download dialog. but if I re-click on the same document I will be redirected to the
    The webpage cannot be displayed
    And the ms-powerpoint:ofv|u| will be added to the beginning of the URL. So could this be a caching problem ?

  • Show/Search Users from specific organization in OIM

    Hello Everyone,
    I have a requirement where in when a request is submitted and forwarded to say Manager. Now, Manager should reassign the task to other user who is from particular organization say MyOrg1. Is it possible to implement this. Currently, when I try to reassign the task to some other user, it provides me users from all the Organizations. It should show only those users who are from MyOrg1 and should not show users from other Organizations.
    Please let me know.
    Thanks,

    In R2 it is very simple. just provide Organization Viwer/Administrator Admin Role on other organization to Manager . Now manager can assign to other user who exist under other org.
    I don't know if it is possible in R1. you can check with the Object PermPolicy. do the same as R2. I mean provide viwer permission on this organization
    Look at data object permission tab and there also you can provied read access for Organization Admin role.
    For R1 find below link
    http://docs.oracle.com/cd/E21764_01/doc.1111/e14316/org_mangmnt.htm#CHDFBDDB
    and
    http://docs.oracle.com/cd/E21764_01/doc.1111/e14316/org_mangmnt.htm#BABGFGAJ

  • Hiding users in Corporate Directory

    I am trying to remember how to hide users in CD in CM. Referring to this tech note, hiding users is not that of a big deal, but this user gets removed from CD in Callmanager and hence the user doesnt show up in the phone. The disadvantage of this method is that you can modify any user related parameter from the web interface. How can we work around this ? Is there another alternative method ?
    http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_tech_note09186a00804d2087.shtml

    Sankar you might want to try the following:
    HIDE USERS
    DC DIRECTORY
    You can hide users from beeing visible in the Corporate Directory.
    For doing this, you have 2 options:
    1) Set the first name to blank and put the whole name in the last name
    field. Full Administrator users will not appear in the corporate
    directory.
    2) To hide a user in DC Directory:
    First, cut and paste the following 4 lines into a file called "hideuser.ldif"
    text file, and save it in the C: drive of the publisher callmanager server.
    dn: cn=[userid],ou=users,o=cisco.com
    changeType: modify
    replace: Description
    Description: CiscoPrivateUser
    Set the [userid] to be the user you would like to hide. Example for the
    UserID "ctifw":
    dn: cn=ctifw,ou=users,o=cisco.com
    changeType: modify
    replace: Description
    Description: CiscoPrivateUser
    Next run the following command from a cmd prompt on the publisher callmanager
    server in order to set the description field in DC Directory.
    ldapmodify -h -p 8404 -D "cn=Directory
    Manager,o=cisco.com"
    -w -c -f hideuser.ldif
    From 3.3 onwards, system users (or special users) are filtered out from the
    search results. The users are filtered based on the attribute "Description".
    If "Description" is CiscoPrivateUser, the user is not displayed in search
    results from Corporate Directory or Users->Global Directory.
    AD DIRECTORY
    To hide a user in AD do the following:
    * If integrated with AD 2000:
    dn: cn=[userid], CN=users, dc=[domain], dc=com
    changeType: modify
    replace: Description
    Description: CiscoPrivateUser
    Save this file on the AD server as "hideuser.ldif".
    Then execute on the AD server:
    ldifde -i -f hideuser.ldif
    * If integrated with AD 2003:
    Copy the following 5 lines (please note the '-' after the four lines. In
    AD2K3, this is required and has changed from AD2K) into a text file and
    replace the [userid] with the userid of the user that needs to be
    hidden. Replace the [domain] with your domain. Save this file on the AD
    server as "hideuser.ldif".
    dn: cn=[userid], CN=users, dc=[domain], dc=com
    changeType: modify
    replace: Description
    Description: CiscoPrivateUser
    Then execute on the AD server:
    ldifde -i -f hideuser.ldif

  • How hide ribbon bar for read only users from custom master page.

    Hi,
    I want to hide the ribbon bar for read only users, on my custom master page I put inside of a SharePoint:SPSecurityTrimmedControl this div: <div id="ms-designer-ribbon">, but when I  save the changes the master page does not work
    anymore.
    <!--MS:<SharePoint:SPSecurityTrimmedControl runat="server" AuthenticationRestrictions="AddAndCustomizePages">-->
    <div id="ms-designer-ribbon">
    <!--SID:02 {Ribbon}-->
    <!--PS: Start of READ-ONLY PREVIEW (do not modify) --><div class="DefaultContentBlock" style="background:rgb(0, 114, 198); color:white; width:100%; padding:8px; height:64px; ">The SharePoint ribbon will be here when your file is either previewed on or applied to your site.</div><!--PE: End of READ-ONLY PREVIEW -->
    </div>
    <!--ME:</SharePoint:SPSecurityTrimmedControl>-->
    I'll appreciate any suggestions in order to solve this.
    Regards.

    did you close browse and open a fresh session?
    also authericationrestrictions for add & customize people so its more than read...
    check this one
    http://msdn.microsoft.com/en-us/library/jj822366.aspx
    another blog for same stuff:http://spgurunet00.web707.discountasp.net/post/2012/12/13/Hiding-SharePoint-2013-Ribbon-from-Anonymous-Users.aspx
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • LDAP - Anonymous Search

    Hi,
    I have a piece of code that came with an application that tries to bind to an LDAP server, but, it tries to do so directly with the uid provided, rather than doing a search through the tree before that to get the right DN to authenticate with. I was wondering if someone could help me add the anonymous searching to the script below, which would allow for the authenticate after that to use the DN obtained from the anonymous search.
    -- Script --
    import java.io.IOException;
    import java.sql.SQLException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.log4j.Logger;
    import java.util.Hashtable;
    import javax.naming.directory.*;
    import javax.naming.*;
    public class LDAP extends AppServlet
    /** log4j logger */
    private static Logger log = Logger.getLogger(LDAP.class);
    /** ldap email result */
    private String ldapEmail;
    /** ldap name result */
    private String ldapGivenName;
    private String ldapSurname;
    private String ldapPhone;
    protected void doDSGet(Context context,
    HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException, SQLException, AuthorizeException
    // check if ldap is enables and forward to the correct login form
    boolean ldap_enabled = ConfigurationManager.getBooleanProperty("ldap.enable");
    if (ldap_enabled)
    JSPManager.showJSP(request, response, "/login/ldap.jsp");
    else
    JSPManager.showJSP(request, response, "/login/password.jsp");
    protected void doDSPost(Context context,
    HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException, SQLException, AuthorizeException
    // Process the POSTed email and password
    String netid = request.getParameter("login_netid");
    String password = request.getParameter("login_password");
    // Locate the eperson
    EPerson eperson = EPerson.findByNetid(context, netid.toLowerCase());
    EPerson eperson2 = EPerson.findByEmail(context, netid.toLowerCase());
    boolean loggedIn = false;
    // make sure ldap values are null with every request
    ldapGivenName = null;
    ldapSurname = null;
    ldapEmail = null;
    ldapPhone = null;
    // if they entered a netid that matches an eperson
    if (eperson != null && eperson.canLogIn())
    // e-mail address corresponds to active account
    if (eperson.getRequireCertificate())
    // they must use a certificate
    JSPManager.showJSP(request,
    response,
    "/error/require-certificate.jsp");
    return;
    else
    if (ldapAuthenticate(netid, password, context))
    // Logged in OK.
    Authenticate.loggedIn(context, request, eperson);
    log.info(LogManager
    .getHeader(context, "login", "type=ldap"));
    // resume previous request
    Authenticate.resumeInterruptedRequest(request, response);
    return;
    else
    JSPManager.showJSP(request, response, "/login/ldap-incorrect.jsp");
    return;
    // if they entered an email address that matches an eperson
    else if (eperson2 != null && eperson2.canLogIn())
    // e-mail address corresponds to active account
    if (eperson2.getRequireCertificate())
    // they must use a certificate
    JSPManager.showJSP(request,
    response,
    "/error/require-certificate.jsp");
    return;
    else
    if (eperson2.checkPassword(password))
    // Logged in OK.
    Authenticate.loggedIn(context, request, eperson2);
    log.info(LogManager
    .getHeader(context, "login", "type=password"));
    // resume previous request
    Authenticate.resumeInterruptedRequest(request, response);
    return;
    else
    JSPManager.showJSP(request, response, "/login/ldap-incorrect.jsp");
    return;
    // the user does not already exist so try and authenticate them with ldap and create an eperson for them
    else {
    if (ldapAuthenticate(netid, password, context))
    if (ConfigurationManager.getBooleanProperty("webui.ldap.autoregister"))
    // Register the new user automatically
    log.info(LogManager.getHeader(context,
    "autoregister", "netid=" + netid));
    if ((ldapEmail!=null)&&(!ldapEmail.equals("")))
    eperson = EPerson.findByEmail(context, ldapEmail);
    if (eperson!=null)
    log.info(LogManager.getHeader(context,
    "failed_autoregister", "type=ldap_but_already_email"));
    JSPManager.showJSP(request, response,
    "/register/already-registered.jsp");
    return;
    // TEMPORARILY turn off authorisation
    context.setIgnoreAuthorization(true);
    eperson = EPerson.create(context);
    if ((ldapEmail!=null)&&(!ldapEmail.equals(""))) eperson.setEmail(ldapEmail);
    else eperson.setEmail(netid);
    if ((ldapGivenName!=null)&&(!ldapGivenName.equals(""))) eperson.setFirstName(ldapGivenName);
    if ((ldapSurname!=null)&&(!ldapSurname.equals(""))) eperson.setLastName(ldapSurname);
    if ((ldapPhone!=null)&&(!ldapPhone.equals(""))) eperson.setMetadata("phone", ldapPhone);
    eperson.setNetid(netid);
    eperson.setCanLogIn(true);
    Authenticate.getSiteAuth().initEPerson(context, request, eperson);
    eperson.update();
    context.commit();
    context.setIgnoreAuthorization(false);
    Authenticate.loggedIn(context, request, eperson);
    log.info(LogManager.getHeader(context, "login",
    "type=ldap-login"));
    Authenticate.resumeInterruptedRequest(request, response);
    return;
    else
    // No auto-registration for valid certs
    log.info(LogManager.getHeader(context,
    "failed_login", "type=ldap_but_no_record"));
    JSPManager.showJSP(request, response,
    "/login/not-in-records.jsp");
    return;
    // If we reach here, supplied email/password was duff.
    log.info(LogManager.getHeader(context,
    "failed_login",
    "netid=" + netid));
    JSPManager.showJSP(request, response, "/login/ldap-incorrect.jsp");
    * contact the ldap server and attempt to authenticate
    protected boolean ldapAuthenticate(String netid, String password, Context context)
    //--------- START LDAP AUTH SECTION -------------
    if (!password.equals(""))
    String ldap_provider_url = ConfigurationManager.getProperty("ldap.provider_url");
    String ldap_id_field = ConfigurationManager.getProperty("ldap.id_field");
    String ldap_search_context = ConfigurationManager.getProperty("ldap.search_context");
    String ldap_object_context = ConfigurationManager.getProperty("ldap.object_context");
    // Set up environment for creating initial context
    Hashtable env = new Hashtable(11);
    env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(javax.naming.Context.PROVIDER_URL, ldap_provider_url);
    // Authenticate
    env.put(javax.naming.Context.SECURITY_AUTHENTICATION, "simple");
    env.put(javax.naming.Context.SECURITY_PRINCIPAL, ldap_id_field+"="+netid+","+ldap_object_context);
    env.put(javax.naming.Context.SECURITY_CREDENTIALS, password);
    try
    // Create initial context
    DirContext ctx = new InitialDirContext(env);
    String ldap_email_field = ConfigurationManager.getProperty("ldap.email_field");
    String ldap_givenname_field = ConfigurationManager.getProperty("ldap.givenname_field");
    String ldap_surname_field = ConfigurationManager.getProperty("ldap.surname_field");
    String ldap_phone_field = ConfigurationManager.getProperty("ldap.phone_field");
    Attributes matchAttrs = new BasicAttributes(true);
    matchAttrs.put(new BasicAttribute(ldap_id_field, netid));
    String attlist[] = {ldap_email_field, ldap_givenname_field, ldap_surname_field, ldap_phone_field};
    // look up attributes
    try
    NamingEnumeration answer = ctx.search(ldap_search_context, matchAttrs, attlist);
    while(answer.hasMore()) {
    SearchResult sr = (SearchResult)answer.next();
    Attributes atts = sr.getAttributes();
    Attribute att;
    if (attlist[0]!=null)
         att = atts.get(attlist[0]);
         if (att != null) ldapEmail = (String)att.get();
    if (attlist[1]!=null)
              att = atts.get(attlist[1]);
              if (att != null) ldapGivenName = (String)att.get();
    if (attlist[2]!=null)
                   att = atts.get(attlist[2]);
                   if (att != null) ldapSurname = (String)att.get();
    if (attlist[3]!=null)
                   att = atts.get(attlist[3]);
                   if (att != null) ldapPhone = (String)att.get();
    catch (NamingException e)
    // if the lookup fails go ahead and create a new record for them because the authentication
    // succeeded
    log.warn(LogManager.getHeader(context,
    "ldap_attribute_lookup", "type=failed_search "+e));
    return true;
    // Close the context when we're done
    ctx.close();
    catch (NamingException e)
    log.warn(LogManager.getHeader(context,
    "ldap_authentication", "type=failed_auth "+e));
    return false;
    else
    return false;
    //--------- END LDAP AUTH SECTION -------------
    return true;
    -- Script --
    Thanks.

    Originally Posted by peterkuo
    Use the Rights role | Modify Trustees; select your tree root. You'll see
    [Public] listed as one of the trustees. Click on the Assigned Rights link,
    and use the Add Property button to add what you need. Make sure you flag
    the assignment Inherit.
    Peter
    eDirectory Rules!
    DreamLAN Network Consulting Ltd. - Leading Authority on eDirectory and LDAP technologies
    Hi, Peter:
    Yeah. I have found the place to set it. But it doesn't work.
    I don't know how to paste screenshot here, so copy only texts from iManager, with format somewhat incorrect:
    Object name: Security
    Trustee name: [Public]
    Property Name Assigned Rights Inherit
    Group Membership Read (only have this ticked) TRUE
    NDSPKI:Tree CA DN Read (only have this ticked) FALSE
    Actually, the rights are "Supervisor Compare Read Write Self Dynamic", but I only have "Read" ticked.
    And the second row of "NDSPKI: Tree CA DN" is not added by me. It is the only original entry there.
    But after I add this attribute (and make it inheritable), click "Done" and "Apply" thereafter, the attribute "groupMembership" still can't appear in anonymous binding.
    Anyting I did wrong?
    thank,
    johny

  • Return multiple values from a search help

    Dear All,
    I have a table control on screen with fields:
    doc.no
    doc.type
    doc.ver
    doc.part
    I've coded a search help for doc. no. which returns a single value i.e. doc. no from the search help.
    But my reqmt. is that when the user selects a particular doc.no from search help, it should also return doc. type/ver/part
    and the corresponding table control field should be populated.
    I mean i require multiple values to be returned and populated in my screen.
    Thanks in anticipation

    Hi ,
    Please check this thread where i had done some coding and the OP himself has found the solution
    automatic population of search help value to another field in module pool ... if its a table control you have get the selected line by  using fm DYNP_GET_STEPL. Then update the values to the respective fields using DYNP_VALUES_UPDATE.

  • Get all users from Active Directory

    Dear All,
    I would like to retreive all USERS from the AD.
    I finaly could connect to an AD server but I couldn't perform the search.
    I got a javax.naming.NamingException: [LDAP: error code 1 - 000020D6: SvcErr: DSID-03100690, problem 5012 (DIR_ERROR), data 0
    --> Does it mean that my query is incorect.
    I think I am missing something obvious. but what?
    Can somebody please help me or point me to some working code sample.
    Thanks in advance.
    Karim.
    //======== Test Code =============
            String THIS_INIT_CONT_FAC="com.sun.jndi.ldap.LdapCtxFactory";
            String THIS_PROV_URL=url;
            String THIS_SEC_AUTH="simple";
            String THIS_SEARCHBASE="CN=Users, CN=domain, CN=com";
            String THIS_ATTRS[] = {"mail"};
    try {
    String THIS_FILTER="(objectClass=user)";
    System.out.println("Testing LDAP Program");
    System.out.println("************************************************************");
    String THIS_SEC_PRIN="";
    String THIS_SEC_CRED="";
    System.out.println("Cont Fac : " + THIS_INIT_CONT_FAC);
    System.out.println("LDAP Server : " + THIS_PROV_URL);
    System.out.println("Auth Method : " + THIS_SEC_AUTH);
    System.out.println("Search Base : " + THIS_SEARCHBASE);
    System.out.println("Filter : " + THIS_FILTER);
    System.out.println("Login : " + THIS_SEC_PRIN);
    System.out.println("Credentials : " + THIS_SEC_CRED);
    System.out.println("************************************************************");
    Hashtable env=new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, THIS_INIT_CONT_FAC);
    env.put(Context.PROVIDER_URL, THIS_PROV_URL);
    env.put(Context.SECURITY_AUTHENTICATION, THIS_SEC_AUTH);
    env.put(Context.SECURITY_PRINCIPAL, THIS_SEC_PRIN);
    env.put(Context.SECURITY_CREDENTIALS, THIS_SEC_CRED);
    DirContext ctx = new InitialDirContext(env);
    System.out.println("LDAP TEST Login Successful!");
    SearchControls constraints = new SearchControls();
    constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
    NamingEnumeration results = ctx.search(THIS_SEARCHBASE,THIS_FILTER, constraints);
    int namecount=0;
    System.out.println("LDAP TEST Results : " + results);
    System.out.println("LDAP TEST Pre-Hit ! ");
    } catch(AuthenticationException ae) {
    ae.printStackTrace();
    System.out.println("Incorrect Password or UserName");
    return false;
    } catch(Exception e) {
    e.printStackTrace();
    System.out.println("Error accessing LDAP");
    return false;
    // ============ OUTPUT =====================
    Testing LDAP Program
    Cont Fac : com.sun.jndi.ldap.LdapCtxFactory
    LDAP Server : ldap://192.168.2.3:389/
    Auth Method : simple
    Search Base : CN=Users, CN=domain, CN=com
    Filter : (objectClass=user)
    Login :
    Credentials :
    LDAP TEST Login Successful!
    javax.naming.NamingException: [LDAP: error code 1 - 000020D6: SvcErr: DSID-03100690, problem 5012 (DIR_ERROR), data 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    If you want to list all the users then you don't need to perform a search. Just list them.
       private void list(String contextName)
          try
             // get enumeration of NameValuePairs
                NamingEnumeration contentsEnum = ctx.list(contextName);
             while (contentsEnum.hasMore())
                System.out.println(contentsEnum.next());
          catch (NamingException e)
             System.err.println("Problem listing context contents: " + e);
       }You will want to call this using something like this:
    list("CN=Users, CN=domain, CN=com");One caveat, there is a restriction on the number of results returned so this will still throw an LDAP exception if you have a lot of users.
    Not sure how to get around that. Never needed to look. Don't expect it is hard though.

  • How can I access the Attribute Values from the Search Region

    Hi all,
    I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
    I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
    Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
    I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
    Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
    If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
    SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
    I don't know how can I access the data from the Search Region.
    Please Help.
    Regards,
    Ranjith

    you could access the parameters entered in search region by the user as follows:
    You can get handle to the value entered by the user using queryListener method in af:query.
    You can intercept the values entered as described
    public void onQueryList(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
    for ( Criterion c : searchList) {
    if (c instanceof AttributeCriterion ) {
    AttributeCriterion a = (AttributeCriterion) c;
    a.getValues();
    for ( Object o : a.getValues()){
    System.out.println(o.toString());
    //call default Query Event
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    public void onQueryTable(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
    MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
    me.invoke(elctx, new Object[]{queryEvent});
    Thanks,
    Navaneeth

  • How to get all users from the server....?

    Hi all,
    in my application i want to get all possible users present in the PORTAL-EP Server
    and set them into the drop down.
    is there need to login in the portal as a admin or other user to get the all users present in the Server.
    Regards,
    Deepak

    Hi! Deepak,
       you can use UME API to get all the users of EP in WebDynpro appl.
    Herewith i am giving you the UME API link --
    <a href="http://help.sap.com/javadocs/NW04/current/um/index.html">http://help.sap.com/javadocs/NW04/current/um/index.html</a>
    i am giving the code also to get all the users from LDAP.
       IPublic<ComponentName>.IUserIDElement userIDNodeElement = null;
    IUserAccountFactory accountFact = UMFactory.getUserAccountFactory();
    MessageManager msgMgr = (MessageManager)wdThis.wdGetAPI().getComponent().getMessageManager();
    try {     
    IUserAccountSearchFilter accountSearchFilter  =  accountFact.getUserAccountSearchFilter();
    accountSearchFilter.setLogonUid("*",ISearchAttribute.LIKE_OPERATOR,false);
    ISearchResult srchRslt = accountFact.search(accountSearchFilter);
       while(srchRslt.hasNext()) {                    
                    userIDNodeElement = wdContext.createUserIDElement();          String uniqueID = (String)srchRslt.next();
         IUserAccount userAccount = accountFact.getUserAccount(uniqueID);
         String LogonUid = userAccount.getLogonUid();
         userIDNodeElement.setCtx_UserID(LogonUid);
         wdContext.nodeUserID().addElement(userIDNodeElement);
        } catch(Exception exc) {
                  msgMgr.reportWarning(umException.toString());
    regards,
    Mithilehwar

Maybe you are looking for

  • Adobe air with flex, file new, open and save for Desktop software program

    I already have a headache from all the searching. I cannot believe this to be such a confusing topic as every software program we create must be able to save user input, right. Here is the problem: Novel writing software program Main window has tabna

  • Can I open a new document in a new desktop in OS Mountain Lion?

    The standard way of doing so is to open the document in the current desktop and then drag it to a new desktop (top right)? I was wondering whether a shortcut operation exists? (something like open in a new tab when navigating on Safari). Thank you

  • After installing Mavericks my computer is suffering from constant kernel panics

    Hi, I installed Mavericks when it came out. Ever since then, my computer restarts on its own at lesat 4 or 5 times per day. Normally I'm web browsing when this happens. Separately, Google Chrome goes through phases when it gives the "Oh snap!" error

  • HELP-My 23 inch ACD will no longer turn on.

    Have tried unplugging the monitor, turning computer off and on - nothing seems to work. Monitor was occasionally going blank then when I unplugged and plugged back into the transformer it would come back on. It seems to happen when the computer goes

  • Problem with Mail Merge to PDF

    Hi there I'm having problems with the mail merge to PDF feature of Acrobat XI, in that the process fails part way through and displays the error message 'Acrobat PDFMaker was not able to mail merge the document': This process used to work, and still