active-directory

Given a GUID representing a user in Active Directory, how would I use this to determine the distinguished name?

Given a GUID representing a user in Active Directory, how would I use this to determine the user's "distinguished name" using C#? The GUID is retrieved earlier in our application using directoryEntry.Guid; MSDN Link ...

Error when running powershell script to import users from csv using Import-Csv and New-QADUser into Active Directory

My script looks like this: $Users = Import-Csv "C:\users.csv" foreach ($User in $Users) { New-QADUser -Name $User.Name ` -ParentContainer $User.OU ` -FirstName $User.FirstName ` -LastName $User.LastName ` -UserPassword $User.userPassword ` -SamAccountName $User.sAMAccountName ` } When I run ...

System.DirectoryServices.AccountManagement.PrincipalContext and Impersonation in a WCF service

Working with the PrincipalContext in code that lies behind a WCF service. The WCF service is impersonating, to allow a 'pass-through' type authentication. While everything else I do with Active Directory (mostly the System.DirectoryServices.Protocols namespace) works fine in this scenario, for some reason the classes in System.Director...

How to list Windows users and groups in ASP.NET?

Hi there! I have a ASP.NET Website project and I need to list all the users and their groups on my Windows system. I have set the identity impersonation to true and provided the username and password of the admin in the web.config. Where do I start? Thanks in advance. Update: I have the following code at the moment - var machin...

Extending UserPrincipal; FindByIdentity() fails

Extending UserPrincipal to take advantage of its built-in properties... running into an issue when we overload the FindByIdentity() method. From Microsoft's example at http://msdn.microsoft.com/en-us/library/bb384372%28VS.90%29.aspx (parts excluded for brevity): [DirectoryRdnPrefix("CN")] [DirectoryObjectClass("inetOrgPerson")] publi...

How should i setup an Active Directory on WinServer 2008r2 to use with TFS in extranet?

I'm trying to deploy Moss and tfs for extra net at home with win server 2008 r2. How should i configure win server active directories? Web server + Active Directory + SqlServer + MOSS + tfs is it enough for successful config? ...

Unable to access Windows Authentication controlled ASP.NET web site from browser on local machine..?

Hi, I have set up a web site on a Windows 7 machine (Application PC), and have configured it to use Windows Authentication. I have set up the User, and can access the site from a remote PC (Remote PC), logging in with the user name and password. My main issue is that I cannot log into the web site when I am on the local machine. Regar...

Change computer name

We use Configuration managar to install operating systems, that for some genius reason does not have a simple way to set rules for machine names. So im looking for a C# API that allows me to change the computer name ( NETBIOS) and change it in Active directory at the same time. I want to set the name AFTER im connected to AD so i can ch...

Active Directory Group and C# webpage configuration

I am wanting to allow access to a C# Webpage to only members in an Active Directory group. Can someone please point me in this direction or assist in anyway? Thanks in advance ...

Active directory and LDAP libraries

I am trying to authenticate users to active directory with the Novell.Directory.Ldap libraries found in Mono. I know there is better ways than below, but given that I'm confined to Mono, these are the only supported routines as best I can see. Using the .NET libraries, I can authenticate a user with their samAccountName. using (Direc...

java is not executing system command

In the following program am giving name as "don" so the command will search activedirectory with all the names starting with don (like donald etc). But the line2 variable becomes null after the assignment from reader object and it never goes into the loop. What am i doing wrong? FYI: the command works when i give it on the command line. ...

How can I do two-stage authentication to an Active Directory server in Python?

I'm running Python 2.6 on a FreeBSD machine, and I would like to do (and I don't know the correct term for this) two-stage authentication against an active directory. Basically, the process to log in user 'myuserid' is: Bind to the AD LDAP server using a system account created for this purpose (call it DOMAIN\gatekeeper) Verify myuser...

In C#, how to access Active Directory to get the list of groups that a certain user belongs to?

In C#, how do i access Active Directory to get the list of groups that a certain user belongs to? The user details are in the form: "MYDOMAIN\myuser" I've been following the instructions from here but they only work if i have the user details in the form: "LDAP://sample.com/CN=MySurname MyFirstname,OU=General,OU=Accounts,DC=sample,D...

How to determine whether a group is security group?

Hi, I need to check whether a group given by name is a security group in AD using C# code. I notice there's a property named "groupType" in groups properties, but I don't know what this property is used for. I checked several groups and find its value can be null, 8 or -2147483646. Is it associated with the security group type? ...

Active directory: Searching for users in a given group

I want to search for a user in the given group. The following command does not work. What is the problem here? dsget group "CN=All Employees,OU=tremble, OU=tgroups, DC=xyz, DC=com" -members|dsget -name ram*|dsget user -samid -display ...

User management in MSSQL

Hello, I'm trying to set up security for my application for users. I am not sure about my logic. Is the following possible: I want to create 1 login for 'all users' in Active Directory. Then I want an admin (in the program self) to choose which user is in which server role (e.g. marketing, sales, ...). Then I want to give those roles p...

Java SimpleDateFormat always returning January for Month

I'm working on taking a date value (createWhen) from Active Directory, and translating it into a Java date, for the purposes of getting a list of accounts created between two dates. Everything is working fine, save for one method: the method where I go from the AD Date to the Java date. The method looks like this: private Date getParsed...

How to get logonserver name in AD domain programatically

A host which part of Active directory domain does authentication from the logon server (domain controller). LOGONSERVER env var has its value. C:>echo %LOGONSERVER% \PUN5OPSDIRPIN01 Is there any API using which I can retrieve this value? ...

****** Modify/Update LDAP Manager Attribute with Asp.Net

Hey Guys, I'm having an issue with modifying MANAGER attribute in Active Directory. I know that manager property is type of DN (distinguishedName). I have no problem updating any other properties like title, department, company(it's type of String), but how do i update DN manager property? Thanx All... Dim de As DirectoryEntry ...

Exchange Server 2003 - Can't connect to exchange server in same machine

Hello, I have an Exchange Server running in a remote machine. We also have an application that connects to this Exchange Server through ActiveDirectory and Independentsoft's WebDav. This works perfectly when I run the application locally, but if I install it in the machine where the Exchange Server is running I only have connectivity wit...