Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This blog is designed as a complement to my FTP and LDAP - Part 1: How to Use Managed Code (C#) to Create an FTP Authentication Provider that uses an LDAP Server blog post. In this second blog, I'll walk you through the steps to set up an Active Directory Lightweight Directory Services (AD LDS) server, which you can use with the custom FTP LDAP Authentication provider that I discussed in my last blog.
The following steps will walk you through installing Active Directory Lightweight Directory Services on a computer that is running Windows Server 2008.
Note: Before completing these steps I created a local user account named "LdapAdmin" that I would specify the administrative account for managing my LDAP instance. This user account was only a member of the local "Users" group, and not a member of the local "Administrators" group.
Click Start, then click Administrative Tools, and then click Active Directory Lightweight Directory Services Setup Wizard.
When the Active Directory Lightweight Directory Services Setup Wizard appears, click Next.
Enter a name for your instance, for example "MyTestInstance," and then click Next.
Verify the port numbers for LDAP connections, and then click Next.
Choose Yes, create an application directory partition, and then enter a unique partition name by using X.500 path syntax. For example: "CN=MyServer,DC=MyDomain,DC=local". When you have finished entering your partition name, click Next.
Verify the paths to the AD LDS files for this instance, and then click Next.
Choose an account for your service account. (Note: Because I was creating a standalone LDAP server, I chose to use the network service account.) Once you have chosen an account, click Next.
If you choose to use the network service account, the AD LDS wizard will prompt you about replication. Click Yes to continue.
Choose an account as your AD LDS administrator. (Note: In my situation I chose the LdapAdmin account that I had created earlier; I did this so that I wouldn't be storing the credentials for an administrative account.) Once you have chosen an account, click Next.
Choose one of the following LDIF files to import; these will be used to create user accounts.
Note: I tested my FTP LDAP authentication provider with both LDIF files.
When prompted for your AD LDS credentials, enter the credentials for the account that you chose to administer your AD LDS instance.
The wizard will begin to install the requisite files and create your instance; this may take several minutes to complete.
Enter the LDAP path for your AD LDS server in the Select or type a Distinguished Name or Naming Contexttext box. For example:
Enter the server name and port in the Select or type a domain or servertext box. For example:
The preceding steps should create the following path in the Pathtext box:
Click the Advanced button; when the Advanceddialog box is displayed:
For additional information about working with AD LDS instances, see the following URLs:
While this is technically outside the scope of setting up the LDAP server, I'm reposting the notes from my last blog about adding the FTP LDAP Authentication provider and adding authorization rules for FTP users or groups.
Once these settings are configured and users connect to your FTP site, the FTP service will attempt to authenticate users from your LDAP server by using the custom FTP LDAP Authentication provider.
Anonymous
July 15, 2014
Hi Rob,
This tutorial has been great and I just had a couple questions of how to authenticate the users information from a remote client.
For example, I've created my AD LDS instance on a windows 2012 server and now I'm trying to use python-ldap to connect to this AD LDS instance from another computer to check user credentials.
Can you explain to me how to do this?
Thanks a lot,
Jeff
Anonymous
July 15, 2014
Hi Jeff,
I've never tried to access AD LDS from Python, so I'm a bit out-of-context on what it might take to get that working, but most of the problems that I have seen regarding issues when connecting to AD LDS have been related to security problems of one sort or other (e.g. authenticating to AD LDS, etc.) With that in mind, I found the following thread on Stack Overflow that might help:
stackoverflow.com/.../authenticating-against-active-directory-using-python-ldap
Anonymous
July 15, 2014
I've followed the steps that you posted in setting up the AD LDS and I've managed to connect to it using ADSI and ldp.exe, I was just wondering if there was a way that I can remotely access the AD LDS instance with all the user credentials and check them? It doesn't have to be python.
Thanks a lot,
Jeff
Anonymous
July 18, 2014
Hello rob,
How do you set a password for your application directory partition so I can increase the security of binds to it.
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in