Re: Set UID and GID for NFS purposes (Solved)
Thanks for that advice Alexander and Robert - since I posted I
discovered the usermod and groupmod commands. As this is a development
box for home, there's only one user (me) so it wasn't an onerous way to
fix the issue. The commands I used were:
usermod -u <idnum> <username>
groupmod -g <idnum> <groupname>
It seems to have done the trick. It was very late at night, but I think
I did also have to chown/chgrp -R the mounted NFS directory - which as
Robert suggests wouldn't be a lot of fun if you had many users.
Something to keep in mind for future reference.
If starting from scratch (without files/users set up) I guess you could
specify the uid/gid on each box when creating users...
Thanks again,
David Powell wrote:
Hi All,
Just had great joy compiling my first kernel (!!) to get NFS working
only to find I'm stuck with what I thought should be an easy one.
At the moment I can read all the files in my NFS mounted directory but I
can't edit them. The owner and group of the files seems correct
(david/david on both machines) but when I "ls -l" the files in my
mounted directory on the client, I see 1002/1002 instead of david/david
(for user/group respectively).
I read in a previous thread that for NFS the UID and GID needs to be
exactly the same - but how do I change this? Chmod chgrp etc don't seem
to do the trick...
Should I just create a new user (I see in the adduser man page I can
specify a UID) and move all the files across? Or is there an easier way?
Ta,
David
--
--
Moondrake Trust
e: moondrake@optusnet.com.au
m: 0415 341 821
Reply to: