Techie Tips

Tips, Tutorials, Software and Reviews

Create an NFS share with Microsoft Services for UNIX 3.5

Submitted: Thu, 11/20/2008 - 15:13 -- guvnor
Last Updated: Sat, 05/12/2012 - 09:45
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. NOTE! This is not designed for Windows 2008 for a Windows 2008 SFU NFS guide Install Window Services for UNIX

Step 1.

Download the SFU from the Microsoft website here

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.

Windows NFS 3.5 Services Wizard

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.

Windows NFS Services

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

Windows NFS User

Windows NFS Group

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 Windows PCNFS Mapping -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.

Windows PCNFS Mapping group

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

Windows PCNFS Mapping User

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 Windows PCNFS Simple Maps Firstly map our standard Windows group with our PCNFS group. Click on Show Group Maps

Windows PCNFS Simple 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 create 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:

Windows PCNFS Simple Maps

Okay lets map our Windows user "dave" with our unix "dave" user. (still with me?) Click on Show User Maps

Windows PCNFS Simple 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.

Windows PCNFS Simple Maps

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. Click okay.

Windows PCNFS Simple Maps

Step 10.

Assign file permissions. From the Windows machine 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 produce 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
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!


Anonymous's picture
Submitted by Anonymous (not verified) on

I got it going now thanks
susi's picture
Submitted by susi (not verified) on

Yamaha R15 dan Yamaha R25 Motor Sport Racing dan Kencang

Camry Mobil Hybrid Terbaik Indonesia Agen Texas Poker dan Domino Online Indonesia Terpercaya

RUMTAR88.COM AGEN BOLA SBOBET IBCBET CASINO 338A TANGKAS TOGEL ONLINE INDONESIA TERPERCAYA Agen Texas Poker Dan Domino Online Indonesia Terpercaya Agen Texas Poker Dan Domino Online Indonesia Terpercaya Agen Texas Poker Domino Online Indonesia Terpercaya

Betklik99 Agen Bola Terpercaya Piala Dunia 2014

ASUS ZenFone Smartphone Android Terbaik Agen Texas Poker Dan Domino Online Indonesia Terpercaya


Anonymous's picture
Submitted by Anonymous (not verified) on

thank you this got me up and running - one thing though i didn't need to download SFU 5 it was ready installed?
guvnor's picture
Submitted by guvnor on

am trying to troubleshoot an issue with a Windows Server 2003 box running the full SFU and SUA installed on an AMD64 box. The issue is that groupadd commands are failing saying that command only works on a domain controller. I found your excellent fix, the problem is that NFS is not an option for me as part of the components when setting up or adding. Is this something that can be added from a separate download, OR is there a workaround for this problem that you could point me to? I would appreciate any assistance. Cheers, Peter
Anonymous's picture
Submitted by Anonymous (not verified) on

बहुत शानदार विवरण Dear guvnor Very nice detail
Anonymous's picture
Submitted by Anonymous (not verified) on

a picture on this topic is not display please fix it, thanks
Anonymous's picture
Submitted by Anonymous (not verified) on

I have used since Interix 2.0 and had forgotten the steps - Thank you very very much - job well done!!!!
Anonymous's picture
Submitted by Anonymous (not verified) on

I've been breaking my head done all the steps when i get to the applying the permissions to the folder i get invalid user same thing for group any idea what that can be?
Anonymous's picture
Submitted by Anonymous (not verified) on

That's is so impressive; I am very pleased by this post. Complete information on this post!!! I really like it
search engine optimization's picture
Submitted by search engine o... (not verified) on

Whenever you run a company, you possess many essential costs to deal with. Some of the very significant costs related to your business have been in the technologies arena, and cutting down on those expenses can trim your organization budget and provide you more income to invest in your company and it is operations.

astuce poker's picture
Submitted by astuce poker (not verified) on

Microsoft ® Windows ® Services for UNIX (SFU) 3.5 provides a wide range of inter-network services platform supported and fully integrated for business customers who need to integrate Windows and UNIX environments. It allows these customers to seamlessly access information stored in multiple platforms, consolidates network management across platforms and reuses UNIX applications and scripts on Windows. This white paper discusses the features of SFU 3.5 and is intended for system administrator, developer or integrator network mixed UNIX and Windows.
peterblack's picture
Submitted by peterblack (not verified) on

This instruction will be useful for you if you want to share NFS folder. The installation and the working procedure are given in a simpler way, so that nobody will find any difficulty in following it. Good job!
steevejooohn's picture
Submitted by steevejooohn (not verified) on

so nice off your sites i like that.... phd thesis proposal
wiki's picture
Submitted by wiki (not verified) on

Anonymous's picture
Submitted by Anonymous (not verified) on

High security fencing is taller than the average barricade. The additional height is supposed to help reduce the number of people that can climb over the materials the enclosure is constructed of and get to the inside perimeter of the property. On prisons and areas that are in charge of extreme security measures the top of this material would have a barbed wire known as razor wire on it.
Anonymous's picture
Submitted by Anonymous (not verified) on

It makes sense to get a cheap car insurance deal but it is not advisable to base your search only on the price you will pay when looking for the right car insurance rate. No matter how cheap a deal is, make sure you read the fine prints of the contract and have a complete understanding of what is covered and what is not covered.
Stephen Mills's picture
Submitted by Stephen Mills (not verified) on

Please help! I am getting an error when I try to select "Show User Maps". I get a pop-up error saying "Unable to access User Name Mapping server. No maps could be obtained".
Heath's picture
Submitted by Heath (not verified) on

I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles.
sbobet's picture
Submitted by sbobet (not verified) on

Whats positive self-same cool site!! Man .. Striking .. Amazing .. I will bookmark your web situate and obtain the feeds also…I'm contented to attain a lot of beneficial in rank here in the send, we need increase extra strategies in this regard, recognition for sharing.