LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   NFS: Ubuntu (server) and Mac OS X (clients) (http://www.linuxquestions.org/questions/linux-networking-3/nfs-ubuntu-server-and-mac-os-x-clients-465043/)

macskeeball 07-17-2006 10:15 PM

NFS: Ubuntu (server) and Mac OS X (clients)
 
I'm a Mac user who was recently given a PC, which I plan to basically use as a headless server and Folding@Home client (as opposed to having the PowerMac continue to do double duty as both a desktop and a server). One of its server tasks I want it to perform is network storage for the two Macs' automated backups. Unfortunately, the Macs see that the PC has available NFS shares but won't let me mount them using the Finder's connect to server. I get an error message saying that the username and password was incorrect, even though it never asks me for a username or password.

PC server: Ubuntu Server 6.06 (kernel version 2.6.15-25-server), wired connection to the router
PowerMac G4: Mac OS X 10.3.9, wired connection to the router
PowerBook G4: Mac OS X 10.3.9, wireless connection to the router
I have full control of all of the computers involved.

The PC's /etc/exports file:
Code:

/home/insert_my_short_username_here/backups powerbookg4.local(rw,async) powermacg4.local(rw,async)
Output of rpcinfo -p localhost on the PC server:
Code:

  program vers proto  port
    100000    2  tcp    111  portmapper
    100000    2  udp    111  portmapper
    100024    1  udp    634  status
    100024    1  tcp    637  status
    100003    2  udp  2049  nfs
    100003    3  udp  2049  nfs
    100003    4  udp  2049  nfs
    100003    2  tcp  2049  nfs
    100003    3  tcp  2049  nfs
    100003    4  tcp  2049  nfs
    100021    1  udp  32847  nlockmgr
    100021    3  udp  32847  nlockmgr
    100021    4  udp  32847  nlockmgr
    100021    1  tcp  33587  nlockmgr
    100021    3  tcp  33587  nlockmgr
    100021    4  tcp  33587  nlockmgr
    100005    1  udp    753  mountd
    100005    1  tcp    756  mountd
    100005    2  udp    753  mountd
    100005    2  tcp    756  mountd
    100005    3  udp    753  mountd
    100005    3  tcp    756  mountd

Output of rpcinfo -p pc-server.local on the Mac client (PowerBook):
Code:

  program vers proto  port
    100000    2  tcp    111  portmapper
    100000    2  udp    111  portmapper
    100024    1  udp    634  status
    100024    1  tcp    637  status
    100003    2  udp  2049  nfs
    100003    3  udp  2049  nfs
    100003    4  udp  2049  nfs
    100003    2  tcp  2049  nfs
    100003    3  tcp  2049  nfs
    100003    4  tcp  2049  nfs
    100021    1  udp  32847  nlockmgr
    100021    3  udp  32847  nlockmgr
    100021    4  udp  32847  nlockmgr
    100021    1  tcp  33587  nlockmgr
    100021    3  tcp  33587  nlockmgr
    100021    4  tcp  33587  nlockmgr
    100005    1  udp    753  mountd
    100005    1  tcp    756  mountd
    100005    2  udp    753  mountd
    100005    2  tcp    756  mountd
    100005    3  udp    753  mountd
    100005    3  tcp    756  mountd

Although I have used Apple's File Sharing (AFP), I have zero experience with NFS. Although I am not afraid of the Terminal, I have limited experience with actual Linux (as opposed to the Unixy side of OS X) and Ubuntu Server (as opposed to Ubuntu Desktop) has no GUI.

I installed the nfs-kernel-server from Ubuntu's repository, and have been referring to the Ubuntu Server Guide and a Linux.com How-to

Any help with this would be greatly appreciated.

PS- I know the NFS setup needs to be locked down more, but before I do that I want this to actually work.

Emerson 07-18-2006 04:32 PM

> I have zero experience with NFS.

Then you probably do not know that NFS is using UID's for authentication (i.e. not usernames). Meaning your Mac user with UID 501 has no rights in server unless there is an user with matching UID.

Also make sure the computer names you are using are solvable via hosts file (unless you run your own DNS). You may want to restrict NFS access to a certain IP range if you are using DHCP.

macskeeball 07-28-2006 11:42 PM

You were correct about that. By using the usermod command and restarting the server, I changed the UID on the server to match the UID on the client which is 502 (501 is the admin account, which I separated from my everyday user for security reasons). However, I still get the same error message as before.

Emerson 07-29-2006 04:50 AM

Well, it certainly is possible. My iMac connects fine. I'd say start simple, make a directory (/opt/shared for instance), chown it to your user and export it without sophisticated options. And try another tutorial, here's a good one: http://linux.2038bug.com/rute-home.html

smells_of_elderberries 12-07-2006 12:46 PM

Hey Macskeeball,

I'm having the exact same problem as you when trying to connect to Ubuntu 6.10 Server using NFS through the Connect To Server dialogue from 10.3.9. Did you ever find a solution? At the moment I'm under the belief it may be a port issue. Apparently, connecting through OS X over a privileged port (i.e. less than 1024) may be problematic - see this wiki. I came across your thread whilst trying to find a way to make OS X connect over an unprivileged port.

Please, if you've fixed this please tell me how! :-)

All the best,

SiR G.

JCMB 03-30-2007 11:51 PM

Server needs insecure
 
the easiest way of getting the Mac OS X client to be able to connect to the NFS server is to edit /etc/exports on the NFS server machine.

in the exports files there will be a line for each share that you are exporting, there will also be some options in () ro or rw for example.

add insecure to this so it will be (rw,insecure) restart nfs and you will be able to connect

The following is the line from my file. you one will of course vary

/web 192.168.0.0/16(rw,insecure)

macskeeball 04-05-2007 05:50 PM

I ultimately just wound up going with SaMBa instead of NFS, which seems to work just fine.

IBall 04-05-2007 06:08 PM

When I used NFS to share files with my Mac, I needed to use NFSManager which can be downloaded for free.

From memory, there was some other things that needed to be done to mount an NFS share on OS X. NFSManager takes care of this for you.

You have to admit though, using Windows technology to share files between two Unix boxes is a bit clumsy :)

--Ian

macskeeball 04-06-2007 09:30 AM

Quote:

Originally Posted by IBall
You have to admit though, using Windows technology to share files between two Unix boxes is a bit clumsy :)

Well, yes, but if it ain't broke, don't fix it.

Emerson 04-06-2007 09:47 AM

Quote:

Originally Posted by macskeeball
Well, yes, but if it ain't broke, don't fix it.

Then break it! Seriously, my Mac and Linux are working fine together. I do not remember having any difficulties setting it up, it was some time ago.

aarontc 03-17-2008 05:38 AM

Just a heads up, I added the insecure option to my /etc/exports file on my Gentoo-based NFS server and OSX Leopard connected fine from the Go -> Connect to Server option in Finder using the URI nfs://server/share


All times are GMT -5. The time now is 11:29 PM.