I gave up on Samba several months ago, and switched to using NFS to share folders over my LAN. But one of my family insists on using Windows XP, so I needed to find a solution to allow them to access the NFS shares. This is neatly done by Microsoft themselves, for "free", using their "Windows Services for Unix" setup. My file server is an Edubuntu Dapper (I use LSTP too) with four NFS shares. Please note that this is a basic, get you up and running howto, there is more configuration required and available, especially for the security conscious, which is beyond the scope of this howto.
First off, you need to understand NFS Server and Client for Ubuntu. I followed this guide, and suggest you do the same.
The important part to understand is the syntax for a shareCode:http://www.ubuntuforums.org/showthread.php?t=249889
Once you have the nfs server and some shares set up, make a note of the syntax needed to access them from a remote box. You will need these later. You can use a dns name or the IP address.Code:yourserver:/data
You may also need the username and password for your server.
QUICK INSTALL OF SFU:
Anyway, fire up your Windows XP box and download the installer for "Windows Services for Unix", currently at version 3.5, from this page:
This is @ 200mb. You will end up with a file called SFU35SEL_EN.exe.Code:http://www.microsoft.com/technet/interopmigration/unix/sfu/default.mspx
Double click to unzip this file, it should upzip into your username's Temp folder, something like C:\Documents and Settings\"yourusername"\Local Settings\Temp. Seek out the setup.exe file and double click. Click through the installer process, as much as you might hate to, accept the licence agreement, and the standard installation option, and without changing any other settings until you reach the mapping page.Tick the radio button in the upper part of the window (Remote User Name Mapping Server) and then enter your server name or IP address in the box. Click OK and finish the installation process. Windows may offer you a restart, which you should take up.If it doesn't, do a reboot anyway. The NFS Client should automatically be started on boot up.
ALTERNATE INSTALL OF SFU: - THANKS TO bodhi zazen
(overcomes user name issues)
Install SFU
Navigate to C:\Documents and Settings\"yourusername"\Local Settings\Temp
Double Click on Sfusetup
* Select Custom Install
* We only need to install :
o NFS -> NFS Client
o Auth Tools for NFS -> User Name Mapping
* Deselect Everything Else
During the next steps accept all defaults
* Default to the Machine's Domain
* Select passwd and group files
* Select user name mapping
Reboot Windows
[edit]
Configure SFU
1. From Ubuntu copy /etc/passwd and /etc/groups to C:\
* You can read these files as Text so you may want to eliminate everything from passwd except the log-in names of your Linux users and everything from groups except users (I did).
2. Launch SFU
Start -> All Programs -> Windows Services for unix -> Services for Unix Administration
3. In the "Client for NFS (On the Left) set the desired permissions of the sharer (I chose rwx for owner and group, nothing for other)
* Click Apply
4. In the "User Name Mapping" (On the Left)
* Select "Use Password and Groups Files" -> Enter C:\passwd and C:\groups in the appropriate boxes
5. Maps Tab
* Select the "Show User Maps" -> Click "Show Windows Users" and "Show Unix Users"
o Select a Windows user and associate it with the appropriate Linux User (one who can normally mount the NFS Share on a Ubuntu Client)
o Click the "Add button"
* Select the "Show Group Maps" -> Click "Show Windows Groups" and "Show Unix Groups"
o I mapped Windows Administrators to Linux Users
o Click the "Add Button"
6. Back to configuration Tab
Click the "Apply" button on the top left Click the "Synchronize Now" button near the bottom
Once Windows is back up, you can start adding NFS network shares. Do this in just the same way as you would add normal network shares in Windows. From File Explorer, select "Tools" and then "Map Network Drive". In the dialog, type the server/share address in the following format:
using the correct name or IP address for your server, and the correct path to your share. Remember the colon ( : ) !! Tick the Reconnect at Logon so that your shares persist through reboots. Windows firewall (or your own firewall) may block NFS Client on reboot, and should offer you the chance to unblock it.Code:yourserver:/data
Now, depending on how you have things set up, you may or may not be asked for a username and password. I wasn't, but this may have been because on the test Windows box I used, I just happened to use the same username and password as I had on the server. Not had a chance to check this out yet. However, click OK on any resultant dialogs that pop up, and head back to Explorer to check out your new nfs network share. (In fact, XP opens up a new window for your share).
OK, this is only supposed to work on server editions of Windows (2000, Server 2003, XP Pro) but there is a hack you can do to make the installer work on XP Home Edition ( I haven't tried it yet) Look here:
1Code:http://oreilly.com/pub/h/2883
[EDIT] Errors on boot of Windows Box due to Persistent Connections to NFS Server
If I set a network share as a persistent login, I get an error dialog on boot of my windows box. Having used the User Mapping Service, I found I could overcome this error dialog as follows:
Create your network share
Send a shortcut of the share or a sub folder within it to the desktop
Disconnect the share
Reboot (no error dialog! )
Double click on the shortcut and one of two things will happen:
You will simply get a dialog asking you to confirm your log on details, which if you "OK" will open a folder on the share
or
You will get a dialog asking you to enter login in details
I also selected simple mapping as an option in User Mapping Service, but this requires you to have the same user on the server as on your windows box, I believe.[END OF EDIT]
Finally, there is a control applet to be found in Start>Programs if you want to play with settings. If I come up with anything else, I will update.
EDIT: I can't personally recommend this effort as a workable/straight forward solution any more, unless you want to tear your hair out. I see nothing wrong in running parallel nfs and samba servers to support Linux and Windows boxes. This is what I have working now for my mixed local network and it doesn't seem to place any real extra load on the server itself.
Bookmarks