active-directory

Impersonate with Delegation or More than one hop on Kerberos? Completely lost

两盒软妹~` 提交于 2019-12-29 06:29:29
问题 My issue here is how to deal with security and a proper implementation of impersonation which will work from a client machine and authenticate properly to my IIS server which passes the still valid impersonation ticket along with the LDAP request. My System is an independent server running on my company intranet which hosts the domain controller, LDAP server, etc, and uses Kerberos protocol. System Info: IIS7 with Windows Auth and Impersonate on Windows 7 x64 Network Info: IIS 6, LDAP,

TSQL: How to get a list of groups that a user belongs to in Active Directory

孤者浪人 提交于 2019-12-29 05:20:12
问题 I have two queries that retrieve all groups and all users in a domain, Mydomain --; Get all groups in domain MyDomain select * from OpenQuery(ADSI, ' SELECT samaccountname,mail,sn,name, cn, objectCategory FROM ''LDAP://Mydomain/CN=users,DC=Mydomain,DC=com'' WHERE objectCategory=''group'' ORDER BY cn ') --; Get all users in domain MyDomain select * from OpenQuery(ADSI,' SELECT objectCategory, cn, sn, mail, name, department,samaccountname FROM ''LDAP://Mydomaindomain/CN=users,DC=Mydomain,DC=com

Convert Windows Timestamp to date using PHP on a Linux Box

徘徊边缘 提交于 2019-12-29 04:24:13
问题 I have an intranet running on a linux box, which authenticates against Active Directory on a Windows box, using LDAP through PHP. I can retrieve a user's entry from AD using LDAP and access the last login date from the php array eg: echo $adAccount['lastlogontimestamp'][0]; // returns something like 129802528752492619 If this was a Unix timestamp I would use the following PHP code to convert to a human readable date: date("d-m-Y H:i:s", $lastlogontimestamp); However, this does not work. Does

Unknown Error (0x80005000) with LDAPS Connection

泄露秘密 提交于 2019-12-29 04:20:10
问题 I've been stuck for the last couple of hours on an annoying Active Directory bit. What I'm trying to accomplish is connect to an Active Directory via LDAP over SSL. The authentication type is anonymous. I'm using .NET Framework 4.0, C# and Visual Studio 2010. The following code should work according to various online resources. But it keeps coming up with the amazing self-explanatory: 'Unknown Error (0x80005000)'. DirectoryEntry entry = new DirectoryEntry(); entry.Path = "LDAPS://some.ldap

ASP.NET Active Directory Membership Provider and SQL Profile Provider

扶醉桌前 提交于 2019-12-29 03:15:05
问题 I am currently designing a Membership/Profile scheme for a new project I am working on and I was hoping to get some input from others. The project is a ASP.NET web application and due to the short time frame, I am trying to use any and all built in .NET framework components I can. The site will probably entertain < 5000 users. Each user will have a profile where custom settings and objects will be persisted between visits. I am required to use an existing Active Directory for authentication.

Query From LDAP for User Groups

那年仲夏 提交于 2019-12-28 12:34:30
问题 How To Get User group of user from LDAP active directory in C# .NET for ASP. In my Scenario I want to Pass user name to method which query from LDAP Active directory and tell me my user is Member of This User Groups. Please help me in this 回答1: If you're on .NET 3.5 or newer, you can also use the new System.DirectoryServices.AccountManagement (S.DS.AM) namespaces. With this, you can do something like: // create context for domain PrincipalContext ctx = new PrincipalContext(ContextType.Domain)

Query From LDAP for User Groups

Deadly 提交于 2019-12-28 12:34:28
问题 How To Get User group of user from LDAP active directory in C# .NET for ASP. In my Scenario I want to Pass user name to method which query from LDAP Active directory and tell me my user is Member of This User Groups. Please help me in this 回答1: If you're on .NET 3.5 or newer, you can also use the new System.DirectoryServices.AccountManagement (S.DS.AM) namespaces. With this, you can do something like: // create context for domain PrincipalContext ctx = new PrincipalContext(ContextType.Domain)

windows authentication not working in ie7

别等时光非礼了梦想. 提交于 2019-12-28 11:54:28
问题 Really need help with this and tried lots of things and run out of ideas. I have a site hosted on an internal development server, accessible for staff internally. the server setup is windows 2008 R2, iis 7.5 sql 2008 express. Im authenticating using active directory. in Chrome the site loads, and automatically logs me in recognising my name. When viewing the site in IE7 the response is: "401 - Unauthorized: Access is denied due to invalid credentials. You do not have permission to view this

Querying Active Directory from SQL Server 2005

你说的曾经没有我的故事 提交于 2019-12-28 04:04:23
问题 How can I query Active Directory from SQL Server 2005? 回答1: Pretty general question but here are some pointers. You need a linked server creating on the SQL Server that points to ADSI (Active Directory Service Interface) something like this will do it. EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5', 'ADSDSOObject', 'adsdatasource' Then you can use the following sort of query. SELECT * FROM OPENQUERY(ADSI, 'SELECT sAMAccountName FROM ''LDAP://DC=MyDC,DC=com,DC=uk'' WHERE

See if user is part of Active Directory group in C# + Asp.net

家住魔仙堡 提交于 2019-12-28 02:24:05
问题 I need a way to see if a user is part of an active directory group from my .Net 3.5 asp.net c# application. I am using the standard ldap authentication example off of msdn but I don't really see how to check against a group. 回答1: With 3.5 and System.DirectoryServices.AccountManagement this is a bit cleaner: public List<string> GetGroupNames(string userName) { var pc = new PrincipalContext(ContextType.Domain); var src = UserPrincipal.FindByIdentity(pc, userName).GetGroups(pc); var result = new