Can I get the members of Domain Users group (AD specific) with JNDI?

Hi All,
I've found these forums very helpful and full of great information, I've been able to retrieve all members of groups that I search for (from the information on this forum), and get the member's attributes such as email addresses through that.
The question I have is, is there a way to query the Domain Users group, since it's a special group in Active Directory, and retrieve the members of it? So far I have been unsuccessful. Here's a query I found that works on .Net:
(|(&({ClassFilter})(memberOf={GroupDistinguishedName}))(distinguishedName={G
roupDistinguishedName}))
I haven't been able to get it to work with JNDI however. Can anyone point me in the right direction?
thanks,
Matt

It's not so much that the Domain Users is a special group, it's more that because by default, all users have their Primary Group set to Domain Users, that it appears to behave differently.
So the query that you're trying to execute via JNDI, would be something like:String searchFilter = "(&(objectClass=user)(memberOf=CN=Domain Users,CN=Users,DC=Antipodes,DC=Com))";And of course if everything has been left to defaults, it doesn't return any results.
Similarly if you look at the member attribute of Domain Users, it will be empty.
Assuming the defaults, and every user's Primary Group is set to Domain Users, the following query would return all the user's whose primary group is Domain Users:String searchFilter = "(&(objectClass=user)(PrimaryGroupID=513))";Note that 513 is the Relative ID (RID) for Domain Users.
Now if you set a user's Primary Group to be something other than Domain Users, then the Domain Users group would now have a value
for it's member attribute and conversely the respective user would now have Domain Users as one of the values of their memberOf attribute.
So then your query would be something like:
String searchFilter = "(&(objectClass=User)(|(memberOf=CN=Domain Users,CN=Users,DC=Antipodes,DC=Com)(PrimaryGroupID=513))){code}
I guess the fundamental question, is why do you need to determine whuch users are members of Domain Users ?
If this is for usie in an application, where the user has authenticated and you are using group membership to make authorisation decisions, perhaps the constructed tokenGroups attribute may be more useful  as it contains the Security Identifiers (SID) for all the groups the user is a member of ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • How can i get the list of all users present in the LDAP

    Hi Experts,
    How can i get the list of all users present in the LDAP ?
    Is there any API or function Code to get all user list??
    Please help me out!!!
    Help will be rewarded

    Well it will depend on exactly where your UME configuration points to in the LDAP tree but yes, it is possible to get all users.  Something like the following should do it:
    import com.sap.security.api.*;
    import com.sapportals.portal.prt.component.*;
    IUserFactory iuf;
    ISearchResult isr;
    IUser user
    String userid;
    iuf = UMFactory.getUserFactory();
    isr = iuf.getUniqueIDs();
    you will need to iterate the ISearchResult object but you can get IUser objects by
    userid = (String)isr.next();
    user = iuf.getUser(userid);
    then you can imanipulate / identify / or whatever you need with the user object
    Haydn

  • How can i get the list of all users present in the UME ?

    Hi Experts,
    How can i get the list of all users present in the UME ?
    Is there any API or function Code to get all user list??
    Please help me out!!!
    Help will be rewarded
    -pankaj chouhan

    Hi Pankaj,
    find the official NetWeaver security javadocs (including access to UME) <a href="http://help.sap.com/javadocs/NW04S/current/se/index.html">here</a>. Look for classs UMFactory and proceed from there.
    Best regards,
    Martin

  • How can I get the attributes details like user name, mail , from sAMAccount csv or notepad file through powershell or any other command in AD?

    How can I get the attributes details like user name, mail , from sAMAccount csv or notepad file through powershell or any other command in AD?

    Ok what about If i need to get all important attributes by comparing Email addresses from excel file and get all required answers
    currently I am trying to verify how many users Lines are missing , Emp numbers , Phones  from AD with HR list available to me.
    I am trying to Scan all the AD matching HR Excel sheet and want to search quickly how many accounts are active , Line Managers names , Phone numbers , locations , title , AD ID .
    these are fields I am interested to get in output file after scanning Excel file and geting reply from AD in another Excel or CSV file
    Name’tAccountName’tDescri ption’tEma I IAddress’tLastLogonoate’tManager’tTitle’tDepartmenttComp
    any’twhenCreatedtAcctEnabled’tGroups
    Name,SamAccountName,Description,EmailAddress,LastLogonDate,Manager,Title,Department,Company,whenCreated,Enabled,MemberOf | Sort-Object -Property Name
    Can you modify this script to help me out :)
    Hi,
    Depending on what attributes you want.
    Import-Module ActiveDirectory
    #From a txt file
    $USERS = Get-Content C:\Temp\USER-LIST.txt
    $USERS|Foreach{Get-ADUser $_ -Properties * |Select SAMAccountName, mail, XXXXX}|Export-CSV -Path C:\Temp\USERS-ATTRIBUTES.csv
    #or from a csv file
    $USERS = Import-CSV C:\Temp\USER-LIST.csv
    $USERS|Foreach{Get-ADUser $_.SAMAccountName -Properties * |Select SAMAccountName, mail, XXXXX}|Export-CSV -Path C:\Temp\USERS-ATTRIBUTES.csv
    Regards,
    Dear
    Gautam Ji<abbr class="affil"></abbr>
    Thanks for replying I tried both but it did not work for me instead this command which i extended generated nice results
    Get-ADUser -Filter * -Property * | Select-Object Name,Created,createTimeStamp,DistinguishedName,DisplayName,
    EmployeeID,EmployeeNumber,Enabled,HomeDirectory,LastBadPasswordAttempt,LastLogonDate,LogonWorkstations,City,Manager,MemberOf,MobilePhone,PasswordLastSet,BadLogonCount,pwdLastSet,SamAccountName,UserPrincipalName,whenCreated,whenChanged
    | Export-CSV Allusers.csv -NoTypeInformation -Encoding UTF8
    only one problem is that Manager column is generating this outcome rather showing exact name of the line Manager .
    CN=Mr XYZ ,OU=Users,OU=IT,OU=Departments,OU=Company ,DC=organization,DC=com,DC=tk

  • I can't get the new Maverick OS I downloaded to work with iTunes.  I am trying to copy some songs onto an SD card and it won't let me create a new folder or click and drag the tunes onto a folder or into the current SD card.  What am I doing wrong?

    I can't get the files to drag onto a file or onto the SD card.  What should I do?

    Did you accidentally engage the lock slider on the side of the card?  What exact error messages are you seeing?

  • # How to get the system AD Domain user login name in portal?

    when a system user use AD Domain method login the system.
    and then the user open the portal web application page, but not use AD Domain name login in portal page, that time ,I want to catch the user system login name show in portal page?
    I hava try the sereval method with Java or Jsp, or User Cookies ActiveX pulg,I get only the name of the portal hostname.
    so Anyone will provider me a well method to get the user login name?

    Elobrate more on ur problem

  • How can i get the amount of online user??

    when a user sign in or sign out,the amount of online user should change��
    and i now use a class that implements HttpSessionAttributeListener to implements this function,has three method:
    public void attributeAdded(HttpSessionBindingEvent se)
    public void attributeReplaced(HttpSessionBindingEvent se)
    public void attributeRemoved(HttpSessionBindingEvent se)
    and by attributeAdded i can count the amount of online user correctly when a user sign in.
    but when sign out,there are some troubles:
    user can leave through three method 1.signout button(it is related to session.removeattribute("user")),and use attributeRemoved can count the amount of online user correctly when a user sign out.
    2.close the browser directly
    3.not close the browser directly but use this browser navigator to another webpage(by enter url in address toolbar)
    the problem is: when user sign out through method 2 and method 3,i can't listen it
    and attributeRemoved not invoked.
    help!!!!!!!!!!!!!!!!!,how can solve it,thanks a lot!!!

    Sooner or later server will kill session so the only way is to look at HttpSessionListener interface
    Paul

  • Get the values that an user write in textbox with typed_context

    Thanks for your time
    I want to verificate, the values (product configuration) that an user have introduced,
    I have written this code to get the values and verificate this.
      DATA:
          lr_info   TYPE REF TO cl_crm_bol_entity.
      lr_info ?= ME->typed_context->ISUORDERITEM->collection_wrapper->get_current( ).
    lr_info has an atritbute  T_EXTENSION_FIELDS, this is a table with the values of the product configuration, but I don't know how I can access to this values.
    Could you help me, please??
    Or other option to get the values to verificate this ??
    Thanks

    When I get the solution, I will post here, thanks
    Edited by: Javier Garcia on Oct 20, 2008 3:44 PM

  • I can't get the PC to sync my contacts and calendars with my IPhone and IPad

    I got a replacement IPhone 5 and since that I can't get my ICloud to work between the Iphone and PC

    Could you walk us through what happens (when you try to do the sync) in some more detail, please?

  • How can I get the sum of fields in group

    example:
    fieldA fieldB
    2 30 group1
    2 10
    5 12 group2
    5 14
    5 9 group3
    8 1
    8 9
    the values of fieldA in a group are the same.
    each group i want to calculate fieldA only once: 258
    how can i do this and display the sum at the first page of the report?

    Please re-post if this is still an issue to the Business Objects Integration Kits - SAP Forum or purchase a case and have a dedicated support engineer work with you directly

  • I can't get the evernote web-clipper add-on to work with FF 3.6.8

    I have installed the evernote web clipper add on but nothing happens when i click on the evernote icon in the toolbar, or on the "add to evernote" command on the Tools menu.

    You would be better off asking on the Evernote User Forum - http://forum.evernote.com/phpbb/viewforum.php?f=34

  • How can I find the currently logined domain name on Windows??

    Dear,
    I've a program that query some user account information from A.D.
    But I don't want to hard code anything.
    I've read some previous post about using LDAP, and using DNS queries to found all LDAP server of A.D.
    But how can I get the A.D. domain name in Java?
    for example
    ldcp://_ldap._tcp.xxxx.yyyy
    I want to get "xxxx.yyyy" from the logined user account. It is possible in Java.

    You coud use the NTSystem class to derive the NetBIOS domain name, however without doing some gymnastics it isn't easy to derive the fully qualified domain name. import java.io.*;
    import com.sun.security.auth.module.NTSystem;
    class NTDomain {
         public static void main(String[] args) {
              NTSystem system = new NTSystem();
              String domain = system.getDomain();
              System.out.println("Domain: " + domain);
    }The only other alternatives could be to check the domain suffix of the user principal that was authenticated via Kerberos ....
    lc = new LoginContext(searchkrb5.class.getName(),new SampleCallbackHandler());
         lc.login();
         catch (LoginException le) {
              System.out.println("Logon failed: " + le);
              System.exit(-1);
         System.out.println("Authenticated via GSS-API");
            System.out.println("User: " + lc.getSubject().getPrincipals().toString); however I think that you still have to specifify the Kerberos realm in the apps configuration file.
    Another alternative could be to make assumptions about the machines hostname, however one day an assumption will always be proven wrong, (eg. The machine's DNS domain name does not need to match the Active Directory domain).
    Unless there is a Java API to read the Windows registry or extract Kerberos ticket information from the WIndows Kerberos ticket cache, you may be kind of stuck.

  • How to get the activity of a user?

    Hi Experts,
    How can we get the activity of a user i.e. Which transaction a particular user has gone or some activity log on a particular date? Any table, FM or Tcode. I have already checked the STAD and SM20 transactions. Some authorization problem. So anything except these Tcodes would be helpful. Thanks in advance.
    Regards,
    Prashant.

    >
    santhosh kumar wrote:
    > Hi,
    >
    > I guess if it is not updated or traced under STAD means, i.e. related to authorization failures etc.. kind of stuff will be saved at runtime only in the SAP memory.
    >
    > As it is stored in the buffer, can not be traced in any of the transaction.
    > You should request the user to save and send the screen shot of the SU53 of the user whenever he gets some authorization issue.
    >
    > Based on that, by looking into the SUIM transaction, it can be known whether he is authorized or not, which roles have been assigned etc.. kind of details.
    >
    > Regards,
    > Santhosh.
    Hi Santosh,
    Actually I am doing a root cause analysis for which I need to know whether a particular user has used a particular TCode. I guess the STAD will display only the current data, is there a TCode to display historical data related to user accessing a particular data. Note: I don't have basis authorization.
    Regards,
    Prashant

  • JTextField (getting the entered text by user)

    hello...
    how can i get the text entered by user on a jTextField?

    call the getText() method on JTextField

  • After update to O/S 7.1.2 my iPad2 is stuck on Vertical Orientation and will not shift to horizontal as it has in the past.  How can I get the flexible orientation back??

    After update to O/S 7.1.2 my iPad2 is stuck on Vertical Orientation and will not shift to horizontal as it has in the past.  How can I get the flexible orientation back??

    I agree with what FoxFifth has said, but I want to add a little to the discussion and put my own twist on the explanation.
    If you see a lock icon in the upper right corner of the screen - then the screen orientation is locked.
    Try the side switch above the volume rocker first and see if that unlocks the screen.
    If you are running iOS 7, swipe up from the bottom of the screen to get to the control center and the lock icon is in the row of icons at the top all the way to the right.
    If the screen is unlocked but still will not rotate, reset the iPad.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the button

Maybe you are looking for

  • I am trying to remove two full page black borders from my Pages document and when I click on them they are greyed out

    I am trying to remove 2 full page size black borders in my pages document and whn i click on them they show greyed x's but i cannot manipulate or remove them.   What to do?

  • "Error in TTCmd::Prepare() while allocating statement handle")

    "Error in TTCmd::Prepare() while allocating statement handle") How does this kind of error come out? What is the reason? The posibilities are what? Hoping to receive your answers/ Thanks! Edited by: user10789526 on 2009-8-20 上午12:13

  • Problem with embeded movies

    I recently got Dream weaver to promote myself as an animator and am attempting to make my first website. While not the most sophisticated looking page in the world, it is functional so far. However, I've been trying to put my demo reel/animations ont

  • Tried to connect to TV, display (ibook?) died

    I hope someone can help me with this one! I have been having some issues lately connecting my ibook to a tv ... kinda of had to fidget with the video plug to get it to work right. It would be almost all the way plugged in but not quite and then it wo

  • Change color on visited links

    Firefox 35.0.01 Intel Core i7-3770 CPU @ 3.40GHz, 32.0GB RAM, NVIDIA GeForce GTX 580 I recently did a "refresh" (?) on Firefox and my visited links are no longer changing color. I've gone to Options - Content - Fonts & Colors - Colors... and the Link