active-directory

Is there a glitch with opendir/readdir?

Here is my PHP code: <?php // Enumerate the directories in styles $styles_dir = 'styles/'; if($handle = opendir($styles_dir)) { while(FALSE !== ($file = readdir($handle))) { echo $file . '(' . is_dir($file) . ')<br>'; } } ?> Here are the directories in styles: And here is the output: .(1) ..(1) forest() indus...

Issue Querying LDAP DirectoryEntry in ASP.NET

I have users login to my application via Active Directory and then pull from their AD information to garner information about that user like so: Dim ID as FormsIdentity = DirectCast(User.Identity, FormsIdentity) Dim ticket as FormsAuthenticationTicket = ID.Ticket Dim adDirectory as New DirectoryEntry("LDAP://DC=my,DC=domain,DC=com") Dim...

Strange FileNotFoundException occuring on production server in console application

Hi I have an application that works fine in my dev enviroment, but throws weird errors in the production enviroment, I checked the version of .net on my dev machine aswell as the production server , they both run 3.5.30729.01. The exception I get is a System.IO.FileNotFoundException. StackTrace: at System.Diagnostics.FileVersionIn...

Accessing Active Directory Role Membership through LDAP using SQL Server 2005

I would like to get a list of Active Directory users along with the security groups they are members of using SQL Server 2005 linked servers. I have the query working to retrieve records but I'm not sure how to access the memberOf attribute (it is a multi-value LDAP attribute). I have this temporary to store the information: DROP TABLE...

How should I access Active Directory from a C# application running on mono in Linux?

My code will run in Windows (non-mono) and in Linux (mono). Currently, I am using System.DirectoryServices, which works great in Windows. But in Linux: System.NullReferenceException: Object reference not set to an instance of an object at System.DirectoryServices.DirectorySearcher.InitBlock () [0x00000] at System.DirectoryService...

Does a System.DirectoryServices.AccountManagement.Principal ever have a null GUID?

I have a situation where I need to store a globally unique identifier that points to an Active Directory user account. I'm leaning towards the Guid because it is easier to store than the Sid. According to the MSDN entry, the property (which is a Nullable), will always return null if the ContextType is set to "Machine." I don't need to ...

GlassFish Security Realm, Active Directory and Referral

I've setup up a Security Realm in Glassfish to authenticate against an Active Directory server. The configuration of the realm is as follows: Class Name: com.sun.enterprise.security.auth.realm.ldap.LDAPRealm JAAS context: ldapRealm Directory: ldap://172.16.76.10:389/ Base DN: dc=smallbusiness,dc=local search-filter: (&(objectClass=use...

Microsoft Small Business Licensing Kick Start

I seem to recall hearing at some point (I believe it was MIX09) that Microsoft has a licensing model of some sort where a business can consume licenses for up to two years, free of charge, until they reach a point where they are stable position and can pay their licensing at the end of two years. However, I can't find information regard...

What is the easiest way to get the primary groupName from AD in C#?

I am currently using PrincipalContext and UserPrincipal to return the users primary groupid. How can I take this id and find the actual group name? Also I have code that works correctly to assign the user's primary group, but once I assign them to the group I can not delete them from Domain Users which is the default primary group pri...

Searching for multiple users with PrincipalSearcher

Is it possible to search for multiple user names with a single PrincipalSearcher call. Maybe by providing an 'OR' of the requested user names as the filter criteris ? ...

Active Directoy LDAP - Lock User Account

What is the prefered way to lock an Active Directory account? int val = (int)directoryentry.Properties["userAccountControl"].Value; directoryentry.Properties["userAccountControl"].Value = val | 0x0010; vs. directoryentry.InvokeSet("IsAccountLocked", true); Is there a better way? ...

Best advice on which of these limited options might work on Google Chrome/Firefox Extensions

Sorry, I know it sounds subjective, but it's quite technical and specific. But any brainstorming is quite welcome and there may not be one right answer. So, I'm working on a new project that will involve various tools for Exchange Server 2007/2010, most of these tools would ideally be Firefox add-ons and now with Google Chrome having ...

Asp.net MVC/Silverlight and Sharepoint 2010 integration

Just a sidenote: I'm not sure whether I should post this to serverfault as well, because some MOSS admin may have some info for me as well? Additional note 1: I've found this document (Asp.net MVC 2 & Sharepoint integration) if anybody with sufficient expirience is willing to comment on its content whether this can be used in my ...

How do I query delegation properties of an active directory user account?

I am writing a utility to audit the configuration of a WCF service. In order to properly pass credentials from the client, thru the WCF service back to the SQL back end the domain account used to run the service must be configured in Active Directory with the setting "Trust this user for delegation" (Properties -> "Delegation" tab). Us...

Active Directory on local server and intranet on external server.

I have a local Active Directory server and a external web server where my intranet is located. $ad = ldap_connect("ldap://ip-address") or die("Couldn't connect to AD!"); ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3); $bd = ldap_bind( $ad, "user@domain", "password") or die("Can't bind to server."); When I run this on a local web ...

How can I use active directory to assign permissions to a web application?

I have several web applications developed using PHP and would like to set these up to allow user authentication through active directory (specifically so that users can authenticate using their domain credentials). I am able to use LDAP to authenticate the user to a group that I have created, but am unsure how I can assign user permissi...

Where can I get a one-off server of Active Directory for Developing against?

We're not a windows shop, but one of our products is going to need to optionally integrate with Active Directory - things like SSO etc. I'd really rather not go through the rigamarole of setting up a whole server just to develop against it and then leave it hanging around for testing purposes. Is there a simple cloud-based service wher...

JNDI InvalidnameException for CN 'LastName, FirstName'

Hi: I am writing to active directory using JNDI, it is successful for "CN=Yuri Gagarin,OU=Admins,DC=ead,DC=ubc,DC=ca"; but fails for "CN=Gagarin, Yuri,OU=Admins,DC=ead,DC=ubc,DC=ca". I need to store displayName, cn, name in the format 'lastName, FirstName'. What do I need to do to get this going? Thanks very much. ...

Error: Only LDAP Connection Strings are Supported against Active Directory

I have the following ASP.NET Membership section defined in the Web.config file: <membership defaultProvider="AspNetActiveDirectoryMembershipProvider"> <providers> <clear/> <add connectionStringName="ADService" connectionUsername="umanage" connectionPassword="letmein" enablePasswordReset="true" enableSearchMethods="true" ...

Can I get Active Directory attributes from the WindowsPrincipal?

I would like to get the Employee-ID for the currently logged in user. Is that easily available in some .Net class or do I need to do some sort of LDAP query? Any tips welcome ...