Page 1 of 9 123 ... LastLast
Results 1 to 10 of 87

Thread: How to mount NFS shares from Ubuntu box onto Windows XP as Client

  1. #1
    Join Date
    Mar 2006
    Beans
    Hidden!

    Smile HOWTO: Mount NFS shares from Ubuntu/Linux in Windows XP

    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.
    Code:
    http://www.ubuntuforums.org/showthread.php?t=249889
    The important part to understand is the syntax for a share
    Code:
    yourserver:/data
    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.

    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:
    Code:
    http://www.microsoft.com/technet/interopmigration/unix/sfu/default.mspx
    This is @ 200mb. You will end up with a file called SFU35SEL_EN.exe.

    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:
    Code:
    yourserver:/data
    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.

    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:
    Code:
    http://oreilly.com/pub/h/2883
    1

    [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.
    Last edited by Jose Catre-Vandis; January 21st, 2011 at 08:15 PM. Reason: Link to XP Home hack edited
    No longer participating......

  2. #2
    Join Date
    Nov 2006
    Beans
    54

    Re: How to mount NFS shares from Ubuntu box onto Windows XP as Client

    Ok, I ser this up myself and it works beautifully except for one thing: windows doesn't like folders like "/shared/photos".

    It can access them but you can't create shortcuts or anything to them (which is what I was planning on doing as the windows users aren't technical).

    Anyway, I guess I am just going to have to move everything out of /shared on my fileserver and place it in /. Unless someone has a workaround?

  3. #3
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: How to mount NFS shares from Ubuntu box onto Windows XP as Client

    Quote Originally Posted by mulligan.can View Post
    Ok, I ser this up myself and it works beautifully except for one thing: windows doesn't like folders like "/shared/photos".

    It can access them but you can't create shortcuts or anything to them (which is what I was planning on doing as the windows users aren't technical).

    Anyway, I guess I am just going to have to move everything out of /shared on my fileserver and place it in /. Unless someone has a workaround?
    Not sure what you mean? Is this folder (sub folder) in your home directory? Where is "shared/photos" on your NFS server that you cannot link to it directly? Why not just set up another NFS folder pointing at this location, or set up the links or mount points on your linux box instead?

    [EDIT]
    I have just tested this out:

    I created the following folders in the home directory of my NFS server:

    Code:
    /shared/photos
    So the full path is now

    Code:
    /home/myusername/shared/photos
    Edit /etc/exports and add the line below to the bottom and then save (myusername is your login name, xx.xx.xx.xx is the IP of your NFS server)

    Code:
    /home/myusrename/shared/photos xx.xx.xx.xx/24(rw,no_root_squash, async)
    then restart the server

    Code:
    sudo /etc/init.d/nfs-kernel-server restart
    and export the file system

    Code:
    sudo exportfs -a
    head back to your Windows client, and in explorer open up a new network share, typing

    Code:
    xx.xx.xx.xx:/home/myusername/shared/photos
    Click Yes in the tick boxes, and reconnect on login so it persists, and you should be presented with your folder
    Last edited by Jose Catre-Vandis; December 27th, 2006 at 06:21 PM.
    No longer participating......

  4. #4
    Join Date
    Nov 2006
    Beans
    54

    Re: How to mount NFS shares from Ubuntu box onto Windows XP as Client

    Did pretty much exactly that when I tried the first time :S.

    Must be something funky with that particular laptop. (My parents and sister use it and they dont know a lotbut know enough to mess things up if you know what I mean ).

    Anyway, thanks for the help. Guess I'll just have to play around with windows a bit.

    Cheers

  5. #5
    Join Date
    Aug 2005
    Beans
    48

    Re: HOWTO: Mount NFS shares from Ubuntu/Linux in Windows XP

    I've got Vista Ultimate, so I have access to the NFS client and other UNIX services. It installed great. I can map drives great. I can even access files that are 777. The only problem is that most of my files are 775 or 770.

    I'm guessing that Vista is sending the wrong UID (and GID) to my NFS server. I had the same problem in XP. I don't know if I can change my UID and GID, or if my Ubuntu server is supposed to be a Name Mapping Server somehow.

    Quote Originally Posted by Jose Catre-Vandis View Post
    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.
    I'm guessing that this Name Server is supposed to say, "Hey, for any user with the name Zukakog, use UID 1000 and GID 1000."

    How can I check if my Ubuntu server is mapping names correctly?

  6. #6
    Join Date
    Dec 2006
    Location
    Melbourne, Australia
    Beans
    432

    Re: How to mount NFS shares from Ubuntu box onto Windows XP as Client

    Code:
    http://hacks.oreilly.com/pub/h/2883
    I'm having trouble finding this hack. Can you help me more in finding it.

    Would like to use NFS rather than Samba to network my Ubuntu pc with my dual boot Ubuntu/XP Home so this is important to me.

    Having just done a clean install of Feisty this seems a good time.

    Thank you.

    Rob

  7. #7
    Join Date
    Dec 2006
    Location
    Melbourne, Australia
    Beans
    432

    Re: How to mount NFS shares from Ubuntu box onto Windows XP as Client

    Never mind. Google found it.

    Rob

  8. #8
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: How to mount NFS shares from Ubuntu box onto Windows XP as Client

    I was excited to see this how-to when you posted it. I did not try it as I do not use Windows.

    I recently started using Windows XP Pro in VirtualBox, and must say it has been fun to play with windows networking.

    So ...

    I tried the how-to and it kind of works, but it is very strange.

    The Windows install recognizes the nfs server (which is up an runing on both the server and client side but iwth LInux clients), but I get a "permission denied" error from windows.

    This is also a strange program because it is asking for a user name and password to connect to the nfs. I have tried connecting with root and several users, no joy ...

    So I see you have posted a link "http://hacks.oreilly.com/pub/h/2883"

    Well, that link is no longer working.

    I see Erlander found it, but my google is broken and he did not post the link he found ...

    OK, so no real problem for me, although I would not mind playing. As I said though I am free of Microsoft anyways, really, really I am. Well except the workplace is enslaved ...

    So, what I am asking, ....

    • Please update the oreilly link, or suggest a replacement others may refer to if there are questions beyond your how-to.
    • Any suggestions on how to get this windows NFS thing up and running or trouble shoot?
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  9. #9
    Join Date
    Dec 2006
    Location
    Melbourne, Australia
    Beans
    432

    Re: How to mount NFS shares from Ubuntu box onto Windows XP as Client

    The hack involves hacking Windows XP Home to turn on some of the features of Win XP Pro. I haven't done it and probably won't as I'm using Windows less nowadays and have found that by setting up a SSH share I can access my Windows XP folders and files from both my Ubuntu pc's. (One pc is dual boot.)

    I don't think I should post links to Windows XP hacks on an open forum.

    Rob

  10. #10
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Thumbs down Re: How to mount NFS shares from Ubuntu box onto Windows XP as Client

    Update ~

    Thanks for the How-to Jose Catre-Vandis

    I am a fan of your work on the forums.

    I was able to get NFS Sares mounted But it took some research

    For all interested I updated this how-to on the UDSF wiki :

    http://doc.gwos.org/doku.php/doc:net...res_on_windows
    Last edited by bodhi.zazen; October 6th, 2007 at 06:54 AM. Reason: UDSF link updated
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

Page 1 of 9 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •