active-directory

LDAP query for changes

会有一股神秘感。 提交于 2021-01-28 21:12:10
问题 I am on a project where are creating a generic LDAP interface to integrate with an LDAP compliant directory (Active Directory, etc). Our design REQUIRES us replicate the users/groups (not passwords) from the LDAP directory into a separate database (I won't go into the reasons for this here). On some interval our plan is to query the directory through LDAP, pull all the user/group information, and sync that with what we have. The first hit would require we get everything, but subsequent

LDAP authentication problem in ASP.NET Core for restricted users (logon workstations) using Novell.Directory.Ldap.NETStandard2_0

最后都变了- 提交于 2021-01-28 21:01:53
问题 I use Novell.Directory.Ldap.NETStandard2_0 package to authenticate users from Active Directory and it works fine for most of users. using (var cn = new LdapConnection()) { cn.Connect(ldapOptions.Host, ldapOptions.Port); var userDn = username.IndexOf('@') < 0 ? username + $"@{ldapOptions.Domain}" : username; cn.Bind(userDn, password); if (cn.Bound) { result.Result = AuthResult.Succeed; result.Message = "Login Successful using LDAP: {0}."; } return result; } The problem is when we need to

LDAP authentication problem in ASP.NET Core for restricted users (logon workstations) using Novell.Directory.Ldap.NETStandard2_0

心不动则不痛 提交于 2021-01-28 20:32:02
问题 I use Novell.Directory.Ldap.NETStandard2_0 package to authenticate users from Active Directory and it works fine for most of users. using (var cn = new LdapConnection()) { cn.Connect(ldapOptions.Host, ldapOptions.Port); var userDn = username.IndexOf('@') < 0 ? username + $"@{ldapOptions.Domain}" : username; cn.Bind(userDn, password); if (cn.Bound) { result.Result = AuthResult.Succeed; result.Message = "Login Successful using LDAP: {0}."; } return result; } The problem is when we need to

VBScript - Retrieving a user's nested groups and getting rid of repetitions

一笑奈何 提交于 2021-01-28 12:13:47
问题 For my work, I have to write a script in VBScript that retrieves a list of ALL groups a user belongs to, including nested groups, and take out nested groups that would be repeated throughout the list (as well as indent nested groups, further indent nested groups of nested groups, etc.) I found a script that fetches the entire list of groups a user belongs to by Monimoy Sanyal on gallery.technet.microsoft.com, and tried to adapt it to my needs. Here is the script as edited by me: Option

C# Active Directory: Add user to group in another domain

我的梦境 提交于 2021-01-28 06:18:40
问题 I created a Windows Form application to create an active directory user account in domain1 and aims to add it to the groups which are inside domain2. Here is the code I used: PrincipalContext pc1 = new PrincipalContext(ContextType.Domain, "domain1.company.com", "DC=domain1,DC=company,DC=com", ContextOptions.Negotiate); UserPrincipal up = new UserPrincipal(pc1, "username", "password", true); up.Save(); PrincipalContext pc2 = new PrincipalContext(ContextType.Domain, "domain2.company.com", "DC

Python ldap3 code to get username from SID

谁说胖子不能爱 提交于 2021-01-28 04:54:41
问题 I have a SID string (e.g., "S-1-5-21-500000003-1000000000-1000000003-1001") of a user on a shared Windows server, and I need to get the related username. I suppose that this may be achieved by: 1) Turning the SID string into byte array. 2) Using a suitable ldpa query to get the related username. But I failed to find exact and reliable instructions of how to do it (this way or another). I'll appreciate any useful guide, especially if it comes with demo Python (ldap3) code. Thanks! 回答1: You

Can I add Active Directory to Team Foundation Server afterwards

故事扮演 提交于 2021-01-27 20:30:44
问题 I've been wanting to use Team Foundation Server at work. We have a MSDN subscription that includes TFS. The company has a server here at my current location that is not on the company network but has access to the internet (it's own internet connection with a static IP) I'm curious if it is possible to set me and the other developer up with a temporary account on TFS2013 so that we can use the server while it is still here. Then when it gets moved to its new home and gets added to the domain

PassportJS authenticates user but returns 401 Unauthorized on subsequent requests

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-27 19:39:40
问题 I'm writing one of my first applications in NodeJS so please bear with me. I've managed to successfully authenticate a user to our Active directory and I can see the connect.sid cookie being set and used on the subsequent requests. Upon debugging the application by dumping the req object I can also see that the user variable has been set successfully. From the documentation I've read that seems to be a criteria for a successful session match? However, the request is still getting a 401

How to find PC from list of users

。_饼干妹妹 提交于 2021-01-27 17:22:41
问题 I need some help. I'm not so sure that this possible. I have list of samAccountName in .csv file, and from this I need to get their PC name and IP. I'm not so sure how to build script like this. 回答1: One way of doing this could be to loop through all computers in your environment and test each one. This of course will be SLOW There is no example of what your CSV file looks like in the question, but if it looks something like this: "SamAccountName","title" "jdoe","testuser" "rboizov","system

How to find PC from list of users

久未见 提交于 2021-01-27 17:21:59
问题 I need some help. I'm not so sure that this possible. I have list of samAccountName in .csv file, and from this I need to get their PC name and IP. I'm not so sure how to build script like this. 回答1: One way of doing this could be to loop through all computers in your environment and test each one. This of course will be SLOW There is no example of what your CSV file looks like in the question, but if it looks something like this: "SamAccountName","title" "jdoe","testuser" "rboizov","system