This blog post is a guide on how to add a Linux Samba share as a DFS Target Folder.
Installation of DFS
- Open an administrator PowerShell window
-
Install the DFS feature
- Windows 2008 R2: servermanagercmd –i FS-DFS-Namespace, RSAT-DFS-Mgmt-Con
- Windows 2012 : add-Windowsfeature FS-DFS-Namespace, RSAT-DFS-Mgmt-Con
Configuration of DFS
- Open the DFS Management console.
-
Expand the DFS Management and click Namespaces
-
Right Click Namespace à New Namespace
-
Select the one of the servers that have the DFS feature installed.
-
Type the name for the DFS. Ex: files. Click Edit Settings to configure the share permissions.
-
Configure the permissions for the share. In this example we will use Administrator have full access; other users have read and write permissions.
-
Select the type of DFS you will use. In this case we will use Domain-based namespace and select “Enable Windows Server 2008 mode” then press next.
-
Press Create to go ahead and configure the DFS.
-
Press Close to finish the installation.
Adding Namespace Servers
- Open the DFS Management console
-
Click the existing DFS (domainshare) à Add Namespace Server
-
Type the name of the other server with DFS feature installed. In this example DFS is installed on the DC's. Click Edit Settings to configure the share security settings
-
Configure the permissions for the share. In this example we will use Administrator have full access; other users have read and write permissions.
-
After you add all your DFS servers you will see all your namespace servers in the Namespace Server tab
Add Folder to the DFS
Folders are the way DFS present the different shares to the users. You will have to add a folder for each Share that you want to present to the DFS.
-
Right click the DFS à New Folder
- Type a name. In this case I will call it SambaShare
-
Press Add to add the location of the folder.
-
Press OK when you finished adding the folder.
-
Open a computer and browse your new DFS. Ex: cavarpefiles , you will see your new share, if you browse the folder you will see the files in the share.
Add a second folder target
In the DFS folder you can have multiple targets to direct the users to the closes server.
-
Left click the Folder à Add Folder Target.
-
Type the target information. Ex: servershare
-
In the Replication message select No as we do not want windows to manage the replication for the Linux Shares.
-
You will see all the targets in the Folder Target tab.
Detect the site of a Windows Client or Server
In order to detect the client Active Directory Site you can follow this steps.
- Open an Administrator Command Prompt
- Type: nltest /dsgetsite
-
You should see the site where the computer is located at that time.
Nice work, though what if the *nix share requires authentication?
Because the DFS is only providing a pointer to the actual share, you will have to configure all your authentication in the *nix server. It will be preferable that you configure your SAMBA daemons to authenticate against Active Directory so you can get the users to access their files without prompting for authentication. Check http://wiki.samba.org/index.php/Samba_%26_Active_Directory