Computer's group membership

I am trying to find a way to list the groups a computer knows it is a member of. Normally a computer only picks up a group membership change after a reboot. You can purge the kerb tickets and it will sometimes pick up the new membership.
I have a requirement to determine if a group membership has propigated to >300 servers for GPO filtering, but the only way I can find to validate this is by running a gpresult and checking the computer group memberships.
I started by trying to run a gpresult remotely but that does not always return the computer group membership. Is there a wmi call that can pull this or can a kerb ticket be dissasembled to get the memberships?

jrv,
I understand how Active Directory and the various methods of GPO provisioning work.
The systems in question (>300 production servers) have been added to a provisioning group. This group is used to filter application of a GPO. I need to validate the systems have picked up the new group membership before moving forward with a multi-step
implementation.
When a gpresult is run the output displays the groups the system is a member of in order to determine GPO application. I am trying to get this data from remote systems programatically, hence why I posted in this forum since I am specifically asking if anyone
knows of a WMI (or other) call that would return the computer group memberships.
As I re-organize a GPO structure in dire need of cleanup I am going to have to do this validation multiple times over a large number of servers. Being able to automate this process would help quite a bit.
"For computer accounts this requires a reboot." - See this article: 
http://setspn.blogspot.com/2010/10/updating-servers-security-group.html

Similar Messages

  • ADMT 3.2 Intraforest Computer Migration Group Membership

    Hello friends,
    I'm performing an Intraforest migration. I'm in the testing phase with Computer Migrations. The fact is that the computers belong to Universal Groups in the source domain and also in the target domain. Some of the groups are used to apply GPOs. Problem:
    when I do the migration from the source domain to the target domain, ADMT do not include the migrated computer to the same groups it was in the source domain. ADMT is able to include the migrated computer on groups that are not used for GPOs. Does somebody
    know why is this happening? What can I do in order to mantain the group membership of my computer?
    Thank you!

    Hi,
    Usually, it is recommended that we perform migration in the following steps:
    Group migration
    Users account migration
    Services account migration
    Security Translation
    Computers account migration
    To perform an intra-forest migration, the following article can be referred to as reference.
    Checklist: Performing an Intra-forest Migration
    http://technet.microsoft.com/en-us/library/cc974337(v=ws.10).aspx
    Best regards,
    Frank Shen

  • Klist Purge is not working when trying to update a computer security group

    I cannot get Klist purge to work on any of our computers. After running the command "klist
    -lh 0 -li 0x3e7 purge"  I have tried internally and externally using VPN.  The computer does not see new security group settings.
     Windows 7 Clients.

    Try klist -li 0x3e7 purge and then "gpupdate /force" to update the security group membership.

  • SQL syntax for querying Active Directory group membership

    Post Author: cantrejj
    CA Forum: Data Connectivity and SQL
    I've established a connection to Active Directory through Crystal Reports XI. Now I need to write an SQL select statement to return all computer accounts and their group memberships. My statement returns all the computer accounts in the target OU, but when I add the memberOf field to my report everything goes blank. What am I doing wrong? I've included below my query statement and would welcome any suggestions...******************************************Select CN, memberOfFrom 'LDAP://OU=Managed Accounts, OU=Central Valley Service Area, DC= root, DC=sutterhealth, DC=org'where ObjectClass='computer'********************************************

    No ERRORs, no PANICs:
    # grep -i error /var/log/samba/log.smbd
    # grep -i panic /var/log/samba/log.smbd
    # grep -i error /var/log/samba/log.smbd.old
    # grep -i panic /var/log/samba/log.smbd.old
    #

  • PowerShell: AD Group Membership

    Is it possible to generate group membership for all groups in AD, b member of that group?
    Thanks
    *alex

    One good thing about using DirectoryServices.DirectorySearcher in PowerShell is that the syntax is so similar to similar VBScript programs using ADODB. The first program in VBScript would be as follows:
    Option Explicit
    Dim adoCommand, adoConnection, strBase, strFilter, strAttributes
    Dim objRootDSE, strDNSDomain, strQuery, adoRecordset, strName, strDN
    Dim strLine, arrMembers, strMember
    ' Setup ADO objects.
    Set adoCommand = CreateObject("ADODB.Command")
    Set adoConnection = CreateObject("ADODB.Connection")
    adoConnection.Provider = "ADsDSOObject"
    adoConnection.Open "Active Directory Provider"
    Set adoCommand.ActiveConnection = adoConnection
    ' Search entire Active Directory domain.
    Set objRootDSE = GetObject("LDAP://RootDSE")
    strDNSDomain = objRootDSE.Get("defaultNamingContext")
    strBase = "<LDAP://" & strDNSDomain & ">"
    ' Filter on group objects.
    strFilter = "(objectCategory=group)"
    ' Comma delimited list of attribute values to retrieve.
    strAttributes = "distinguishedName,sAMAccountName,member"
    ' Construct the LDAP syntax query.
    strQuery = strBase & ";" & strFilter & ";" & strAttributes & ";subtree"
    adoCommand.CommandText = strQuery
    adoCommand.Properties("Page Size") = 200
    adoCommand.Properties("Timeout") = 30
    adoCommand.Properties("Cache Results") = False
    ' Run the query.
    Set adoRecordset = adoCommand.Execute
    ' Enumerate the resulting recordset.
    Do Until adoRecordset.EOF
        ' Retrieve values and display.
        strDN = adoRecordset.Fields("distinguishedName").Value
        strName = adoRecordset.Fields("sAMAccountName").Value
        strLine = """" & strDN & """,""" & strName & """"
        arrMembers = adoRecordset.Fields("member").Value
        If Not IsNull(arrMembers) Then
            For Each strMember In arrMembers
                strLine = strLine & ",""" & strMember & """"
            Next
        End If
        Wscript.Echo strLine
        ' Move to the next record in the recordset.
        adoRecordset.MoveNext
    Loop
    ' Clean up.
    adoRecordset.Close
    adoConnection.Close
    The second program, where sAMAccountName's are substituted for member DN's, would be as follows:
    Option Explicit
    Dim adoCommand, adoConnection, strBase, strFilter, strAttributes
    Dim objRootDSE, strDNSDomain, strQuery, adoRecordset, strName, strDN
    Dim strLine, arrMembers, strMember, objMemberList
    ' Setup ADO objects.
    Set adoCommand = CreateObject("ADODB.Command")
    Set adoConnection = CreateObject("ADODB.Connection")
    adoConnection.Provider = "ADsDSOObject"
    adoConnection.Open "Active Directory Provider"
    Set adoCommand.ActiveConnection = adoConnection
    ' Search entire Active Directory domain.
    Set objRootDSE = GetObject("LDAP://RootDSE")
    strDNSDomain = objRootDSE.Get("defaultNamingContext")
    strBase = "<LDAP://" & strDNSDomain & ">"
    ' Retrieve all users, groups, and computers.
    strFilter = "(|(objectCategory=user)(objectCategory=group)(objectCategory=computer))"
    ' Comma delimited list of attribute values to retrieve.
    strAttributes = "distinguishedName,sAMAccountName"
    ' Dictionary object (hash table).
    Set objMemberList = CreateObject("Scripting.Dictionary")
    objMemberList.CompareMode = vbTextCompare
    ' Construct the LDAP syntax query.
    strQuery = strBase & ";" & strFilter & ";" & strAttributes & ";subtree"
    adoCommand.CommandText = strQuery
    adoCommand.Properties("Page Size") = 200
    adoCommand.Properties("Timeout") = 30
    adoCommand.Properties("Cache Results") = False
    ' Run the query.
    Set adoRecordset = adoCommand.Execute
    ' Enumerate the recordset.
    Do Until adoRecordset.EOF
        ' Retrieve values and display.
        strDN = adoRecordset.Fields("distinguishedName").Value
        strName = adoRecordset.Fields("sAMAccountName").Value
        ' Skip contacts.
        If (strName <> "") Then
            objMemberList.Add strDN, strName
        End If
        ' Move to the next record in the recordset.
        adoRecordset.MoveNext
    Loop
    ' Recordset must be closed before it can be opened again.
    adoRecordset.Close
    ' Filter on all group objects.
    strFilter = "(objectCategory=group)"
    ' Comma delimited list of attribute values to retrieve.
    strAttributes = "distinguishedName,sAMAccountName,member"
    ' Construct the LDAP syntax query.
    strQuery = strBase & ";" & strFilter & ";" & strAttributes & ";subtree"
    adoCommand.CommandText = strQuery
    ' Run the query.
    Set adoRecordset = adoCommand.Execute
    ' Enumerate the resulting recordset.
    Do Until adoRecordset.EOF
        ' Retrieve values and display.
        strDN = adoRecordset.Fields("distinguishedName").Value
        strName = adoRecordset.Fields("sAMAccountName").Value
        strLine = """" & strDN & """,""" & strName & """"
        arrMembers = adoRecordset.Fields("member").Value
        If Not IsNull(arrMembers) Then
            For Each strMember In arrMembers
                If (objMemberList.Exists(strMember) = True) Then
                    ' Substitute the sAMAccountname from dictionary object.
                    strLine = strLine & ",""" & objMemberList(strMember) & """"
                Else
                    ' Use the Distinguished Name.
                    strLine = strLine & ",""" & strMember & """"
                End If
            Next
        End If
        Wscript.Echo strLine
        ' Move to the next record in the recordset.
        adoRecordset.MoveNext
    Loop
    ' Clean up.
    adoRecordset.Close
    adoConnection.Close
    Richard Mueller - MVP Directory Services

  • Dynamic Group Membership - All SQL Computers in a Domain

    I am trying to create groups containing all SQL servers in each domain. I am using the Wizard in the console. However I appear to be having winter blues as I can't work out how to do it. Everything I try results in an empty group.
    Can someone please explain what I need to do to?

    Roger
    Thanks for the input. The code looks logical and I applied it and imported a revised MP. However I am not getting any membership in the group. There is another group membership in the same MP and that populates correctly, so I haven't a clue where I'm going
    wrong. As you can see below my rule is the same as yours, except with a different domain name.
    <Expression>
                 <And>
                              <Expression>
                                           <RegExExpression>
    <ValueExpression>
    <Property>$MPElement[Name="MicrosoftWindowsLibrary7585010!Microsoft.Windows.Computer"]/NetbiosDomainName$</Property>
    </ValueExpression>
    <Operator>ContainsSubstring</Operator>
    <Pattern>DOMAINNAME</Pattern>
                                           </RegExExpression>
                              </Expression>
                              <Expression>
                                           <Contained>
    <MonitoringClass>$MPElement[Name="MicrosoftSQLServerLibrary6410!Microsoft.SQLServer.ComputerGroup"]$</MonitoringClass>
                                           </Contained>
                              </Expression>
                 </And>
    </Expression>
    Eric

  • Com.apple.alf.plist file keeps changing group membership

    Hey All, I've read several discussions about this issue.  The com.apple.alf.plist file keeps changing group membership from admin to wheel.  Disk Utility repair changes the group membership to admin but it will change back to wheel during normal use of the computer, it seems that accessing systempreferences.app and security preferences will change the group to wheel. 
    I don't really want to get into a discussion about the wheel account, unless necessary, but since this is a very important system settings file I'd like it to work correctly.  I have noticed several issues with the firewall not responding as expected such as turning off by itself, and app settings changing or disappearing from the security preference pane.  So, I have deleted the plist file and restarted as recommended on other discussions but the issue always returns during normal use.  I think it might be the application owning the plist file causing the issue, but I am not sure which one owns the plist file.  I assume it would be systempreference.app since I think it is a firewall plist file. The permissions for systempreferences.app is strange also; 
    - everyone - custom
    - system    - read/write
    - wheel      - read/write
    - everyone  -read
    This may be the culprit but I tried to make a minor change, so as not to mess up the operating system, and disk utility repair permissions just puts it back the way it was.   Any ideas about this would be very appreciated.
    Note:  I have done a complete system reinstall and the issue still returns.

    OK, Since I haven't gotten any responses about this it must be a complicated issue.  Just as a quick check could some of you good people out there look at the "Get Info" window for the systempreferences.app and see if your permissions look like mine?  I'm still having trouble with the firewall settings not acting as expected such as apps and processes that I have approved/denid connection access not showing up in the firewall pane of system preferences and having to reapprove each startup.  Thank you in advance for any help on this.

  • Policies assigned to groups - membership changes not working

    I have a single ZESM IR8 server setup.
    All security throughout my environment, ZESM and otherwise, is based on group membership.
    If I change a user from one group to another group this change does not reflect in their policy assignment.
    Scenario: GroupA = standard user policy, GroupB = power user policy.
    UserA was first in Group A and therefore got the standard user policy.
    UserA now requires the power user policy.
    Remove UserA from GroupA and add UserA to GroupB (in iManager).
    UserA does NOT get the "power user" policy that is assigned to GroupB
    Am aware that I can assign the policy at a user level but this is NOT an option in my environment. All security assignments MUST happen at a group level.

    What you observed is the expected behavior.
    ZESM doesn't updates group membership in real time once a policy has been published. I've described this behavior on previous posts.
    What the MC does behind the scenes when you click "Publish" on a container or group object is to assign the policy individually to each member/user. For groups, it resolves membership at the time the policy is published then the MC iterates among each member assigning the policy to each of them. That's why you don't see updates once the policy is published.
    Try Updating the published policy to see if that works. From the docs:
    Updating a Published Policy
    Once a policy has been published to the user(s) or computer(s), simple updates can be maintained by editing the components in a policy, and re-publishing. For example, if the ZENworks Endpoint Security Management Administrator needs to change the WEP key for an access point, the adminstrator only needs to edit the key, save the policy, and click Publish. The affected end-users and computers receive the updated policy (and the new key) at their next check-in.
    >>>
    From: laurabuckley<[email protected]>
    To:novell.support.zenworks.endpoint-security-management
    Date: 12/15/2009 7:16 AM
    Subject: Policies assigned to groups - membership changes not working
    I have a single ZESM IR8 server setup.
    All security throughout my environment, ZESM and otherwise, is based on
    group membership.
    If I change a user from one group to another group this change does not
    reflect in their policy assignment.
    Scenario: GroupA = standard user policy, GroupB = power user policy.
    UserA was first in Group A and therefore got the standard user policy.
    UserA now requires the power user policy.
    Remove UserA from GroupA and add UserA to GroupB (in iManager).
    UserA does NOT get the "power user" policy that is assigned to GroupB
    Am aware that I can assign the policy at a user level but this is NOT
    an option in my environment. All security assignments MUST happen at a
    group level.
    laurabuckley
    laurabuckley's Profile: http://forums.novell.com/member.php?userid=122
    View this thread: http://forums.novell.com/showthread.php?t=395870

  • ACS 5.3 Group Mapping based on AD group membership

    Hi,
    I am configuring a new ACS 5.3 system. Part of the rules is that I want to match the users specific AD group membership, and match appropriatly to an identity group.
    What i'm trying to do is say that if the user is a member of the AD Group (G-CRP-SEC-ENG) then associate them with the Identity Group SEC-ENG. The under the access service, authorization portion, i assign shell profiles and command sets based on Identity Group.
    It seems that the ACS server will not match the AD Group for the user, and it will match the Default of teh Group Mapping portion of the policy every time.
    I tried several configuration choices from : AD1:ExternalGroups contains any <string showing in AD>, AD1:memberOf <group>.
    Is there something special i need to do in the Group Mapping Policy to get it to match and active directory group and result in assigning the host to an Identity Group?
    Thank you,
    Sami

    Ok, my case is like this.
    I use ACS 5.3 for VPN authentication, using AD and an external RSA for token authentication (2 factor authentication)
    I didn't add all the VPN users in the ACS, because it will be troublesome, the users authentication will be managed by AD and RSA server.
    In some cases where we need to restrict a group of user to only access certain resources, downloadable ACL is used.
    Following the Cisco docs, i manage to get downloadable ACL works when the authorization profile matching criteria is username, but when i change the matching criteria to Identity group, the downloadable ACL won't work.
    I have a case with Cisco engineer now and still in the middle to sort things out.
    The advice from the Cisco engineer is to have the Access Service set to Internal User instead of RSA server, but that will require us(the admin) to import all the VPN users into the ACS database.
    Wondering whether there is a fix for this.
    Thanks.

  • Weblogic 10.3.0 -  Security Violation when Group Membership Lookup enabled

    Dear Admins,
    We're running a Weblogic 10.3.0 cluster with our own software deployed.
    We're using SQL authentication (JDBC to Oracle DB) to authenticate users.
    Recently we've been tuning our WL cluster to improve performance, and have enabled Group Membership Lookup Hierarchy Caching.
    Sometimes users log into our application and get inssuficient rights (or some other error). This appears to happen at random. Most of the times they can log in without problems.
    We determined it's not something to do with the cluster, although it can happen on one node and the other node will work as normal.
    In the Managed server we see this error (with test user):
    Managed7Server.out00011:java.rmi.AccessException: [EJB:010160]Security Violation: User: 'test' has insufficient permission to access EJB: type=<ejb>, application=leanapps, module=process_general.jar, ejb=LaLifeProcessController,
    method=create, methodInterface=Home, signature={}.
    When we disable Group Membership Lookup Hierarchy Caching, this error never occurs.
    Our settings (Security Realms -> myrealm -> Providers -> SQL Authenticator -> Performance):
    Max Group Hierarchies In Cache: 5000 (we have approx. 2000 groups)
    Group Hierarchy Cache TTL: 3600
    provider specific settings :
    Group Membership Searching: unlimited
    Max Group Membership Search Level: 0
    Also in Myrealm -> Performance we have set :
    Enable WebLogic Principal Validator Cache
    Max WebLogic Principals In Cache: 5000
    If we put the TTL really low (default 60 seconds), the error hardly ever occurs. But we want to have cache that lasts longer then one minute.
    This might be a bug, as we have other clusters running on WL 10.3.5, 12c where we use the same cache settings. This issue does not occur there.
    I'm more then willing to provide more info or config files
    Edited by: user5974192 on 21-nov-2012 5:17

    This is fixed now. Someone had defined a Servlet for the web service in web.xml that was preventing the EJB container to kick in.
    Edited by: user572625 on Aug 25, 2011 11:54 PM

  • OIM: What is the purpose of "Update" while editing group memberships

    Hi,
    This is when you lookup a user's Resource Profile and go to "Edit" link. The process form shows up along with a drop down to edit the group memberships. When we select one of the choices such as "Groups" another window pops up where we could add more entires into the child form. In this form there is an "Update" column with a radio button besides a "Remove" column. What is the purpose of this "Update" column? We can add or delete child entries but what does update do? Is there a way to remove this selection altogether?
    Thanks in advance

    Update I can see used for a cases where you have multiple columns on a child table entry and want to change one of them. Strictly speaking, you can update a single column child table rather than delete and insert also. Access policies always do insert and delete actions, but you will want to implement an update task as well if you expect anyone to be editing child tables on resources directly.

  • OIM 9.1.0.2 Group Membership Removal for Disabled Users

    Hello
    In OIM 9.1.0.2, when a user is disabled, they are removed from the groups they are a member of within 24 hours. i was wondering if this is a set time and if so, can this be extended to a specified time so membership can be left for a week before it is removed from the user. If you can let me know on this I would appreciate it.
    Thanks
    Nick

    Today, when accounts are disabled, within 24 hours all the group memberships are removed on the OIM side. I would like to change the interval for the cleanup so that when an account is disabled, all the existing group (role) memberships stay assinged to the account then after 30 days of the account being disabled, the group (role) memberships are removed. Not sure if this would be an ORM thing or OIM, but I think it would be OIM since ORM still has the role mappings for users when they are disabled.
    Thanks
    Nick

  • How to create LDAP filter-based rule to check Group membership in OAM

    Hi folks,
    I'm having hard time creating an authorization rule to verify ldap group membership. I've followed "Configure User Authorization" article from Oracle website (http://download.oracle.com/docs/cd/E10761_01/doc/oam.1014/b32420/v2authz.htm#BABHBFEJI) and created an Authorization scheme w ldap_attribute_name as User Parameter and ruleExpression as Required Parameter. Then, inside my policy I created an Authorization Rule based on my Authz scheme w Allow Access attrib filter-based Rule which looks like this:
    ldap://ldap_server:port/ou=People,o=Company,c=US??sub?(ldap_attribute_name=ldap_attribute_value)
    This works fine.
    Now, I've added another filter-based rule under the same Authz Rule/Allow Access:
    ldap://ldap_server:port/ou=Groups,o=Company,c=US?uniqueMember?sub?(&(objectClass=groupOfUniqueNames)(cn=ldap_group_name))
    While query looks somewhat correct and works as a command-line argument (slightly modified format), it does not work in OAM (meaning people w out req-d group membership can still login).
    Can someone steer me to the right direction as to what do I need to do:
    1. Change/fix the ldap query
    2. Create new Authz scheme with uniqueMember userParameter; create new Authz rule based on new authz scheme; create new Allow Access filter rule with the ldap query I have
    3. Do smth else
    Any help is greatly appreciated.
    Thank you, Roman

    You can create two authorization rules
    First for user with attribute
    and second for group
    and then in authorization expression you can have AND of these two.
    Regarding your query...
    First ... If your requirement is to give access to all the members of a particular group then you don't require any ldap filters
    All you have to do is in the authorization rule -> Allow access -> Select People (here you have to select group so click on the group tab, its little hard to see but its there in light blue color on dark blue tab) -> select the group you want to give access
    Second.. If your requirement is such that you want to give access to a member of a group which has certain attribute lets say group with status active ( In this case you are not aware of the name of the group because user can be a member of any group but you want to give access only to the group with specific attribute.) then you have to write custom authorization plugin.
    If the option is second let me know i can give you a solution which will work for a single domain without any effort of developing a major plugin.
    Hope this helps,
    Sagar

  • Map a network drive by group membership

    Hello,
    I'd like to map network drives by group membership.
    To begin I just tried with this command.
    $TestMembers = Get-ADGroupMember -identity Test
    $TestMembers | foreach-object {New-PSDrive -name T -PSProvider FileSystem -Root \\MyServer\MyShare -persist}
    My network drive is well mapped but for all my domain users.
    Could you please tell me what's wrong in my command ?
    I know I could use Group Policy Preferences but I'd like to know the powershell command.
    Thanks by Advance.
    Seb.
    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.

    Hello,
    Thanks for your answer it will help me.
    Best Regards.
    Seb.
    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.

  • AD Group Membership with User From Domain Outside of Forest

    Here's one to twist your brain around -
    I have kerberos authentication using Active Directory working between a client's web browser and my web-app hosted in JBoss. I also have limited authorization working by checking group memberships using LDAP. This currently only works if all users are in the same domain. The ever-helpful adler_steven has detailed in another thread (http://forum.java.sun.com/thread.jspa?threadID=603815&tstart=15) how to do a group membership check for all Users/Groups in a single forest using the Global Context.
    I need to go beyond the domain and even beyond the forest and try to authorize a user from a trusted domain by checking if the user is a member of a group in my domain. Authentication works fine using kerberos. It's the authorization by group check I am having trouble with. I believe there are two ways to approach this:
    Approach #1
    Access the MS-specific PAC in the kerberos token from the client to get the group SIDs. The structure of the PAC is nicely defined in this article: http://appliedcrypto.com/spnego/pac/ms_kerberos_pac.html. However, I have no idea how to access the decrypted token. I pass the encrypted token that I receive from the browser to myGssContext.acceptSecContext(...) to complete the authentication.
    Question: Does anyone know how to get the decrypted kerberos ticket from there, specifically the authorization-data field?
    Approach #2
    Try to walk through the Active Directory structures in both domains using LDAP. In the domain group that I am checking, I can see a member attribute that references a foreignSecurityPrincipal object. The CN of this object happens to be the objectSID of the user I am looking for in the remote domain. Unfortunately, I have to check the remote domain server directly to verify that. The foreignSecurityPrincipal object itself does not contain any hint about what user it refers to aside from the SID (no originalDomainName attribute or something similar). It is feasible that I could walk the chain of references back to the remote domain AD server. That would require that my configuration include a list of remote domain servers to check (since I could have users from multiple trusted domains) and that my JBoss server have access to those servers.
    Question: Does anyone know of some other LDAP-related way of finding information about a user from a remote, trusted domain without having to hit the server for that domain directly?
    adTHANKSvance
    Eric

    You should be able to work back from the foreignSecurityPrincipal object :-) He says with a wry smile..
    This post prompts me to think whether one day someone will draw the entity relationship diagram for AD. Oh well, I've been procrastinating for years, a few more won't hurt !
    If it was a user from within the same forest, you should just be able to perform a search against a GC using the objectSID as the search filter. I've forgotten, but I don't think they will be represented as foreign security principals.
    Have a look at the post titled JNDI, Active Directory and SID's (Security Identifiers) available at
    http://forum.java.sun.com/thread.jspa?threadID=585031&tstart=150 that describes how to search for an object based on their SID.
    Now if it is a user from another forest, with which you have a trust relationship, then we begin the navigation excercise.
    You'll need obtain the user's SID (either from the cn or from the objectSID attributes) from the foreignSecurityPrincipal object. For example CN=S-1-5-21-3771862615-1804478405-1612909269-2143,CN=ForeignSecurityPrincipals,DC=antipodes,DC=com
    objectSID=S-S-1-5-21-3771862615-1804478405-1612909269-2143Then obtain the domain RID, eg.S-1-5-21-3771862615-1804478405-1612909269Next you will have to recurse each of the crossRef objects in the Partitions container, in the configuration naming context (which you will find listed in the RootDSE). The crossref objects that represent trusted domains or forests will have values for their trustParent attributes. A sample query would be something like//specify the LDAP search filter
    String searchFilter = "(&(objectClass=crossRef)(trustParent=*))";
    //Specify the Base for the search
    String searchBase = "CN=Partitions,CN=Configuration,DC=antipodes,DC=com";For each crossRef object, you can then use the dnsRoot attribute to determine the dns domain name of the forest/domain (if you want to later use dns to search for the dns name,ip address of the domain controllers in the trusted domains/forests), and then use the nCName attribute to determine the distinguished name of the trusted forest/domain.dnsRoot = contoso.com
    ncName = dc=contoso,dc=comPerform another bind to the ncName for the trusted domain/forest and retrieve the objectSID attribute, which will be the domain's RID. You may want to cache this information as a lookup table to match domain RID's with domain distingusihed names and dns names.String ldapURL = "ldap://contoso.com:389";
    Attributes attrs = ctx.getAttributes("dc=contoso,dc=com");
    System.out.println("Domain SID: " + attrs.get("objectSID").get());Once you find out which domain matches the RID for the foreignSecurityPrincipal, you can then perform a search for the "real user" .And then finally you should have the user object that represents the foreign security principal !
    Just one thing to note. Assume that CONTOSO and ANTIPODES are two separate forests. If you bind as CONTOSO\cdarwin against the CONTOSO domain, the tokenGroups attribute (which represents teh process token) will contain all of the group memberships of Charles Darwin in the CONTOSO domain/forest. It will not contain his memberships if any, of groups in the ANTIPODES forest. If Charles Darwin accesses a resource in ANTIPODES, then his process token used by the ANTIPODES resource will be updated with his group memberships of the ANTIPODES forest. Also you can have "orphaned foreignn security principal", where the original user object has been deleted !
    BTW, If I was doing this purely on Windows, IIRC, you just use one API call DsCrackNames, to get the "real user", and then the appropriate ImpersonateUser calls to update the process token etc..
    Good luck.

Maybe you are looking for