active-directory

directory structures C++

C:\Projects\Logs\RTC\MNH\Debug C:\Projects\Logs\FF Is there an expression/string that would say go back until you find "Logs" and open it? (assuming you were always below it) The same executable is run out of "Debug", "MNH" or "FF" at different times, the executable always should save it's log files into "Logs". What expression wou...

Active directory queries intermittently take 40 minutes to complete

Having moved our ASP.NET site from 32-bit Windows Server 2003/IIS6 to 64-bit Windows Server 2008/IIS7 (classic mode), certain active directory operations are intermittently experiencing huge delays. Specifically, DirectorySearcher.FindOne() and DirectoryEntries.Children.Add() sometimes take up to 40 minutes to complete. These problems s...

how to set up tomcat ldap authentication without member of check

I need to set up LDAP authentication against domain users group in AD; there is problem that ldap authenticatin seem to require that users are member of some other group than default domain users. However when there are 10000+ users its not a solution to assign all them to another group just for this tomcat purpose. There must be anot...

I have a php form that I want propogated with the current logged in Microsoft Active Directory Real Name

I have a simple intranet form where the user has to enter info for a Time off Request or other for some other internal company use. I would like to propagate the name field with the current Real Name that is logged in Microsoft Active Directory. The user has to login on their computer. Is there a way to pull that Real Name with a ph...

Java: Query Active Directory information with minimal user information

So, here's the situation. We'd like to be able to query active directory for a user's roles/group memberships, etc. Now, I can already do that using standard Java API (javax.naming), but I need a username, domain server name/address, and a password to do it. Users also have limited rights, so I can't use any external calls to fancy admin...

Get users AD groups from command line (non-truncated)

I often use the net user command to have a look at AD groups for a user: net user /DOMAIN <username> This works well, however the group names are truncated to around 20 characters. And in my organization, most group names are much longer than this. Does anyone know of a way to get non-truncated AD groups through the command line? ...

LDAP vs. ADSI in manipulation of Active Directory Users

I have been requested to expose a web service for managing Active Directory Users via an intranet. I have been advised that LDAP is viewed as a security vulnerability and is not to be used. Given this constraint, I have managed to connect via ADSI with a DirectoryEntry object like this: DirectoryEntry de = new DirectoryEntry(); de.Pa...

Postgresql in Active Directory Machine

Hi u all, I have a server in wich is installed Postgresql. In this server i want to install theMicrosoft Active Directory. Can i do this without a problems? Can i change the user that run the Postgresql service without a problem? When i installa the AD all the machine users will be deleted so i need to create domain users to run that s...

Adding domain group to local group

I have this simple code: String containerPath = String.Format("WinNT://{0}/{1},group", Environment.MachineName, localGroupName); using (System.DirectoryServices.DirectoryEntry theContainerGroup= new System.DirectoryServices.DirectoryEntry(containerPath )) { String path = String.Format("WinNT://{0}/{1},group", theGroupToAdd_Domain, t...

Active Directory authentication in ASP.Net -- connection string help needed

I am new to Active Directory and asp.net authentication and following this article http://msdn.microsoft.com/en-us/library/ms998360.aspx to get it done. In one place in the article, it says to define the Active Directory connection string, and the example given is: <connectionStrings> <add name="ADConnectionString" connec...

Enumerate all users in LDAP with PHP

I'd like to create a php script that runs as a daily cron. What I'd like to do is enumerate through all users within an Active Directory, extract certain fields from each entry, and use this information to update fields within a MySQL database. Basically what I want to to do is sync up certain user information between Active Directory a...

How to setup Forms Authentication with WindowsIdentity and SQL Server Integrated Security

Here is our current setup. We have Active Directory configured (domain named mis1) that handles all of our authentication issues. We have our web applications setup for impersonation=true so that we can have our database queries called as the user logged in. For this particular application, IIS is set to Anonymous access to we can have F...

COM object that has been separated from its underlying RCW can not be used - why does it happen?

Hi. I sometimes get the following exception: COM object that has been separated from its underlying RCW can not be used Sample code: using (AdOrganizationalUnit organizationalUnit = new AdOrganizationalUnit(ADHelper.GetDirectoryEntry(ouAdDn))) { using (AdUser user = organizationalUnit.AddUser(commonName)) { //set some properti...

For any entry in Active Directory does the DistinguishedName ever changes?

Let's say a group is created with one name. If the group is subsequently renamed, does its distinguishedName also change? I'm looking for a way to permanently track AD objects even if their display names or other properties change. If distinguishedName is not constant, is there something else that is? I've seen objectguid but that se...

Can I use token based authentication with active directory?

I want to be able to securely logon to a system without having to type in username password from a windows pc on active directory. The idea is that I (the client software, running on a logged on windows machine) have some sort of token that will prove to the server that I am who I say I am (the server talks to AD to verify the token and ...

Powershell remove user from specific group in sharepoint

I am trying to remove a specific user from sharepoint and have hit a wall. I keep getting the following error You cannot call a method on a null-valued expression. Code: function verifyUsers { $verify_sitepath="https://extranet.mydomain.com" $verify_site=new-object Microsoft.SharePoint.SPSite($verify_sitepath) $verify_we...

Reading Local Group Policy / Active Directory Settings

I'm writing a C# program that will enforce password complexity in accordance with the Windows Group Policy setting "Password must meet complexity requirements". Specifically, if that policy is set to Enabled either on the local machine (if it's not part of a domain) or by the Domain Security Policy (for domain members), then my software...

Check if AD account has "Logon on as a service" right in Active Directory

Is it possible to check if an account has "Logon as service" right programatically. I know how to setup and check this manually but I would like to check it from C# code. I need to check if this right is enabled on domain level, not just on that particular server. Edit: I am looking to find out if user "Logon on as a service" is define...

Finding what Groups/Distribution lists a specific user belongs to in active directory

Let's say I'm in OU=Groups,DC=contaco,DC=com,ct I can find all the groups in a sub OU, but the only way to find all of the groups user 'bobdole' belongs to is for me to look at each group and see if he is in the 'member' field. Unfortunately, when I look at user 'bobdole', I don't see a memberOf field that has all of these lists, he...

Is the directorysearcher object capped at 5000 even if pagesize is set to greater

Is the directorysearcher findall results method capped at 5000 results even if pagesize is set to greater. It really seems to be, because no matter what I get exactly 5000 results. This is C# ...