Recipe12.25.Configuring FTP Authentication


Recipe 12.25. Configuring FTP Authentication

Problem

You want to authenticate users before they can access content on your FTP server.

Solution

Using a graphical user interface

  1. Open Internet Information Services (IIS) Manager.

  2. In the left pane, expand the console tree and select the FTP Sites node.

  3. Right-click on your FTP site and select Properties.

  4. Select the Security Accounts tab.

  5. To allow anonymous users access to your FTP site, select Allow anonymous connections.

  6. To force users to supply credentials to access your FTP site, deselect Allow anonymous connections.

Using VBScript
' This enables anonymous-only access to a web site ' and configures the default user account and password. ' ------ SCRIPT CONFIGURATION ------ strComputer = "<ServerName>" strSiteID = "<SiteID>" ' ------ END CONFIGURATION --------- set objFtpSite = GetObject("IIS://" & strComputer & "/MSFTPSVC/" & strSiteID)     objFtpSite.AllowAnonymous    = True objFtpSite.AnonymousOnly     = True objFtpSite.AnonymousUserName = "DOMAIN\iisuser" objFtpSite.AnonymousUserPass = "!!sUser" objFtpSite.SetInfo     WScript.Echo "Successfully modified Anonymous settings for: " & _              objFtpSite.ServerComment

Discussion

If anonymous connections are disabled, users are authenticated to your site using Basic Authentication. In this situation, the user is prompted for the credentials of his Windows user account. When the user enters his credentials and clicks OK, the user's password will be appended to the URL and transmitted in clear text across the network, which is not secure.

If you want to configure anonymous FTP, select both Allow anonymous connections and Allow only anonymous connections, which means that users are never prompted for their credentials when trying to access your site. In this case, if you are accessing the FTP site using Internet Explorer, no credentials are prompted for. If you are using a command-line FTP client, however, you have to type anonymous as your username and a password.

See Also

MS KB 314932 (HOW TO: Create an FTP Folder with Read Access but Not List Access)



Windows Server Cookbook
Windows Server Cookbook for Windows Server 2003 and Windows 2000
ISBN: 0596006330
EAN: 2147483647
Year: 2006
Pages: 380
Authors: Robbie Allen

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net