Create an NFS share with Microsoft Services for UNIX 3.5

As unlikely as it sounds to a UNIX die hard there are times when you require a Windows Server to share out an NFS folder. This document explains how to setup a simple scenario which will create a NFS disk resource on a Windows box which is mountable from a Unix client (a Sun Solaris 5.10 machine in this case). For those of us who use both Windows and Unix daily this is quite a handy ability to have. In the example I am going to use two machines (client / server) The server is a standalone Windows 2003 NFS machine is called harpie and the client is a running Solaris 5.10 operating system and is called rasputin. Yep silly host names I agree.

Step 1.

Download the SFU from the Microsoft website

Step 2.

Extract the downloaded files to the Windows machine you are planning to have your NFS share on.

Step 3.

Run the SUF setup routine (wizard)


Step 4

Choose the components you require. To get a simple NFS server running from which you can connect NFS clients such as linux or sun boxes etc to you will require the server for NFS and the server for PCNFS. Press the Next button.




 Step 5

After a few moments the installer should complete . When it does you will need to start up a couple of Windows Services to get your NFS server running. You need the server for NFS service and PCNFS and server for PCNFS services to be running. You may find after installation that they are disabled so you need to set them to either manual or automatic before you can start them.



Step 6.

Create a user to use as the user credentials to access your NFS shares with. This user will needs to be created on the both Windows NFS server you have just installed AND on the Unix / Linux client you wish to mount the NFS share from. On your windows machine (harpie in my case) create a local windows user called dave (you can choose your own name of course) from my Local users and groups tool. I also created a windows group called sfu and added the user dave to it




Now from your UNIX client create a group called sfu with a group id of 600 (arbitrary, you can choose any unassigned number) on your Unix client (rasputin a solaris box in my case).

From the command prompt run:

groupadd -g 600 sfu

Create a user on your unix client called dave and give him a uid of 600 (again arbitrary number) and add him to the group sfu. From the command prompt run:

useradd -u 600 -g sfu -d /home/export/dave dave

Step 7

Create a PCNFS user (dave) and a PCNFS group called (sfu)

-From Harpie the Windows 2003 server open the Services for Unix administration console.

-Choose User Name Mapping and select the Use Password and Group files radio button.

Enter a path such as the default one of C:\WINDOWS\system32\drivers\etc\passwd for the passwd (user file) and C:\WINDOWS\system32\drivers\etc\group for the group files.

-Press Apply


-Now Create the user and group on the Pseudo NFS server PCNFS

– these users will be created in the files passwd and group in much the same way as a standard unix user on a unix OS (you know, /etc/passwd and /etc/group)

-Under the Service for Unix administration choose the server for PCNFS. Select group from the right hand pane and create a group known as sfu and give it a gid of 600. This is the same number you gave earlier when you created a user and group on your unix client.


From the same PCNFS section choose users this time create a user called Dave with the same number from earlier (600 in my case).



Step 8.

Create a map between your Windows user dave and your PCNFS user dave and the a map between your Windows Group sfu and your PCNFS group sfu.

– From the Service for Unix administration choose the user name mapping

-Choose maps and check simple maps



Firstly map our standard Windows group with our PCNFS group. Click on Show Group Maps:




Click on list Windows groups and click on Unix groups. This should generate a list of groups one Windows, one Unix.

Select the group you created earlier called sfu in both lists then press the add button. A group mapping should appear at the bottom of the page under a section title Mapped groups:


Okay lets map our Windows user “dave” with our unix “dave” user. (still with me?)

Click on Show User Maps


This should bring up a username mapping window. Here you create a map between your Windows user (dave) and the local PCNFS user (dave).

Click on list Windows Users and Click on list unix users.

Highlight the ‘dave’ user in both the Windows and Unix lists.

Then click add. This will create a mapping between them.



Step 9.

Create your shared NFS disk. In this example I will create an NFS share called “public”. This is the NFS shared drive you are going to make available from your Windows box to your Unix NFS clients.

On your Windows machine open Windows Explorer and create a new folder.

In this example the folder is c:\public Then right click on the folder and choose sharing and security. This will bring up a window called public properties.

Choose the NFS sharing tab and choose the ‘share this folder’ radio button.



Step 10.

Assign file permissions. From the Windows machine harpie,  go to the command prompt and type:

chown dave c:\public
chgrp sfu c:\public

This will give ownership to a group called sfu and a user called dave or what ever user and group you created earlier. You can verify this by typing:

ls -l

which should return this:

drwx------ 1 dave sfu 0 Jul 2 18:06 public

Step 11.

Mount the NFS share from your Unix client from a mount point called /mnt/public From the command prompt issue these commands

cd /mnt
mkdir public
mount harpie:/public /public

Verify the mount by typing the following: ls -l /mnt Which should return

total 1
drwx------ 2 dave sfu 64 Jul 2 18:06 public

Viola one NFS mount!

Comments are closed.