Compare a Group's objectSid to a user's primaryGroupId

Dunnry, this question is related to my quest that you solved yesterday about how to get a primary group for a user. The difference is this time I try to a a list of users that are member of a given group.

When using the member property to get a list of members of a given Group (e.g. GroupA), it didn't list those users whose primaryGroup is GroupA. So I am thinking to use a filter like (primaryGroupID= GroupA's Objectsid) when search users.

However, the GroupA's objestSid is byte[] type, and the primaryGroupID is int type. Though the method in yesterday's post "CreatePrimaryGroupSID" can convert the int primaryGroupID to byte[] type, but here I need to convert the byte[] type objectSid of the group to a int type so I can use the (primaryGroupID=**) directly to get those users whose primary group is GroupA.  How to do this? Or is it a better way to find out users whose primary group is a given group?

Cheers

0
xpding
8/24/2005 1:17:25 PM
asp.net.active-directory-ldap 2291 articles. 0 followers. Follow

1 Replies
799 Views

Similar Articles

[PageSpeed] 41
Get it on Google Play
Get it on Apple App Store

I found out that I should get the PrimaryGroupToken of the group and use it in the filter (PrimaryGroupID=PrimaryGroupToken) so I can get a list of users whose primary group is the given group.

Cheers
0
xpding
8/24/2005 3:50:47 PM
Reply:

Similar Artilces:

changes made from one user's webpart's page, effects all user's
 I am just doing this offline right now in Visual Web Developer Express 2008I created the login inonce in the memberpage area, people can modify their webpart page. I created several users to test this out.  I loaded it in a browser.When I make changes as logged in user "A" .  Then logout and login as user "B", user "B,s" webpart page has been changed to user "A".This goes true for whomever I log in as.  It changes for everyone.Is there something specific I need to do in order to get everyone's changes to be unique for them...

Replace 1's and 0's in a gridview column with Yes's and No's
Is it possible to change the display of a column in a gridview to show a Yes for all 1's and a No for 0's that display in a particular column of a gridview bound to a database?  If so, can someone share the way with me?  I am using ASP.NET 2.0 with VB Code Behind.  Thanks One way you can do is thrrough  CASE in your select statement: Select YesNoColumn= CASE yourColumn WHEN 1 THEN 'Yes' WHEN 0 THEN 'No' ELSE '' END FROM YourtableLimno <Columns>     <asp:TemplateField HeaderText="yourHeader" SortExpression="yourDataField"> ...

It's Linux !? No, it's BSD ! No, no, it's...
kFreeBSD http://wiki.debian.org/Debian_GNU/kFreeBSD a Debian distro using the FreeBSD kernel ! ObiWan wrote: > kFreeBSD > > http://wiki.debian.org/Debian_GNU/kFreeBSD > > a Debian distro using the FreeBSD kernel ! Why use a BSD kernel? I hope the reason is more than, just because they can. http://wiki.debian.org/Debian_GNU/kFreeBSD_why It's easy to understand why the would want to use Debian packages. :) -- Jimmy Johnson Registered Linux User #380263 >> kFreeBSD >> >> http://wiki.debian.org/Debian_GNU/kFreeBSD >> ...

Help! I cannot access the DataGrid's ItemTemplate's LinkButton's Text Atrribute 's Value!!!!!!!!!!!
I write a datagrid's ItemDataBound method as follows:   private void dgTable_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)  {   if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)   {    if(!isRole("Manager"))    {     LinkButton tmp = (LinkButton)e.Item.FindControl("lbPassed");     if(tmp.Text == "Passed")     {      ((LinkBu...

Hyperlink's, ImageURL's, and OnError's
I created an ASP:Hyperlink and set the ImageURL attribute so the link will be the image.If the image is missing, I would like it to display a 'missing image' pic that I have.  I know you can use the OnError attribute of the <img> tag to run some javascript to change it.Unfortunately I can't find a way to access the Hyperlink's Image that is inside it, so I can add an Attribute so the resulting <img> tag will have an OnError attribute inside of it.Any help?If my Hyperlink is called 'foo'....would I do...  ((Image) foo.Controls[0]).Attributes.Add(&...

Publishing the site's as shortcuts in the users' desktop's
Dear All,I have a web application. In that some client will be configured.In that the authorized person can publish a web page.When the page is published, the shortcut for that URL has to be set in the clients desktop.Can we achieve this functionality?Kindly help to get rid of this.Thanks a lot in advance.  Hi jayachitra  I have read the thread carefully; however, I am not sure I have understood the facing needs correctly. Based on my understanding, you would like to create a shortcut to user’s desktop, right?  If so, it is not recommended due to the security issue, the ...

Get User's Group on Active Directory
Hi! We have two servers, one running using an LDAP and the other using WinNT. I got the group/s of a particular user when logging on LDAP, but can't get the groups on WinNT. So my question is how can i return the group/s of a the logged user? DirectoryEntry entry = new DirectoryEntry("WinNT://DOMAIN/" + userLogged);return entry.Properties["FullName"].Value.ToString();// I tried entry.Properties["Group"].Value.ToString(), but to no effect.thanks. It's a little troublesome, but you should .Invoke the IADsMember::Groups method.  Read this entry here on how to do it and r...

Guru's..?? Any do's and/or dont's for Zfd4 and Citrix..?
We've got a nw6/sp5 network with GW 6.5, bm3.7 and zfd 4.01 up'n'running.. Now we're adding a citrix server ( win2003) to the mix, will supply a couple off app's to users over the internal VPN in another city. Probably we'll skip the AD phase since we can not see any app and/or user with the need for AD. So,, any special considorations..? tip's'tricks..? known issues...? t.i.a... On Mon, 16 Aug 2004 15:57:10 GMT, Emerson wrote: > So,, any special considorations..? tip's'tricks..? known issues...? biggest one... zfd4.x d...

Who's show is SN? Steve's or Leo's?
I don't want to start anything (honestly)! Just want to ask a simple question. Does the Security Now podcast belong to Steve Gibson or Leo Laporte? Maybe I'm in a world all to myself, but when I listen to the excellent SN podcasts, I want to hear STEVE, not Leo. But especially in the past few shows, it seems Leo will repeatedly interrupt Steve in the middle of a sentence that I want to hear the rest of. I consider this very rude of Leo. Steve is making a point that I (we) want to hear, then looses his train of thought after Leo barges in and asks something. It...

DataSet's DataTable's and TableAdapter's Oh My!
Here is my situation.  I am using VB as my programming language.I am creating a part of a website that will be the admin section.  I want the admin to be able to add/edit data in a set of tables that normal users can't.  There are 20 lookup tables that I use in the website that I want the admin to be able to manage (i.e. add, edit, delete, insert).  I don't want to create 20 separate web pages (one for each table).  I have one page that has links to all the tables.  Each link has a "table" querystring variable associated with it.  When the...

411 it's pconsole, 51 it's NWPMW32, 65 it's ???
I like to give some of my users controll over their print jobs. In Netware 3.x to 4.x it was pconsole. In Netware 5.x it was NWPMW32. I don't seem to be able to find the same type of utility for Netware 6.5? We don't like to give user access to nwadmin and the NWPMW32 I copied from my 51 server (TID 10075273) to the 65 server won't display the jobs. Mmccabe, It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply. Has your problem been resolved? If not, you might try o...

Unable to access user control's user control's function\property from another user control
Hi, I used to call an user control's user control function as stated below from my user control in ASP.Net 1.1 wucCompany.wucEmployee.GetEmployeeSomething() After migrating to ASP.Net 2.0, I am unable to use any properties/functions(even the public ones) of the user control's User control's from another user control.  The way I have to do is create property\function in wucCompany which calls the wucEmployee's property\function and call the wucDepartment.GetEmployeeSomething().Since I need to do this change in too many places, I can...

login failed because user's IsApproved is false for user's account
Hi How can i detect if a user's login fails because their account is not approved yet (i.e IsApproved = false in Membership table) I am using a templated login control and if the user's login fails for this reason all that happens is that the FailureText control is displayed. How can i change the failure text if the user's account is not approved? thanks andrea Use Membership.GetUser Function this function Return a hydrated MembershipUser Object you can access its properties and check the validity see the link below http://msdn2.microsoft.com/en-us/library/40w5063z.aspxRega...

how to change a user's mailbox but keep the user's GW id
We have a user whose email has a space between her first name and middle name, which cause the problem in sending out email or receive email from the outside the network. Can someone advise how and where I suppose to change her email name to a valid name like firstname.middlename.lastname@xxx.com from firstname middle.lastname@xxx.com? Thank you very much! On Tue, 23 Oct 2007 15:27:51 +0000, April wrote: Duplicate. -- Joe Marton Novell Support Forum SysOp Novell does not officially monitor these forums! Use the Internet override - in ConsoleOne, GroupWise Tab, Inte...

Web resources about - Compare a Group's objectSid to a user's primaryGroupId - asp.net.active-directory-ldap

How to: Add a user from the OS X command line, works with Leopard!
How to: Add a user from the OS X command line, works with Leopard!

The samba-technical May 2012 Archive by date
May 2012 Archives by date Messages sorted by: [ thread ] [ subject ] [ author ] More info on this list... Starting: Tue May 1 00:32:53 MDT 2012 ...

Resources last updated: 12/3/2015 7:44:04 PM