Re: [Hampshire] nfs - Mounting users

Top Page

Reply to this message
Author: Tim B - Systems
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] nfs - Mounting users
Peter,

nfs shares work on the numeric UIDs and GIDs of the files on the server. It is
possible to use IDs that do not exist on the server, as it is merely a number
to assign ownership to (however, this is unusual). If you need the owning
group to be "kubeadmin" I suggest "chown -R mpd:505 music" as root on the
server, where 505 is the numeric group ID of the kubeadmin group on the
client.

It might be helpful for you to set the server up to use NIS (may be called yp)
which will keep track of all the different users and groups across all your
systems. Obviously this then ties clients to the network and if the server
goes down you're in the proverbial, but if you're filesharing anyway, perhaps
that's not too much of a problem.

Cheers,

Tim B.

On Monday 05 March 2007 13:54, Peter Brooks wrote:
> Hi all,
> Having a bit of an odd one with nfs & users.
> On the server I have this in /etc/exports:
> /home/mpd/music         192.168.1.1(sync,rw,root_squash)

>
> and on the client I have this in /etc/fstab:
> kube-sub:/home/mpd/music /home/kubeadmin/music nfs auto,rw,nosuid,user
>
> The problem is that when mounted, the user & group follows the id's from
> the server.
> I.e
> drwxr-xr-x  29 mpd  root     928 Oct 15 19:20 music

>
> with:
> grep mpd /etc/passwd
> mpd:x:1001:100::/home/mpd:/bin/bash
>
> And on the client:
> drwxr-xr-x 29 iceuser root 928 Oct 15 19:20 music
>
> grep iceuser /etc/passwd
> iceuser:x:1001:100::/home/iceuser:/bin/bash
>
>
> I need the directory when mounted to be owned by the group of kubeadmin,
> however the two /etc/passwd's cannot be in sync.
> Any ideas?


--
--------------------------------
Tim Brocklehurst Marine Design
Better Systems - Better Results
--------------------------------