Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-amd64
Navigation:
Lists: gentoo-amd64: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-amd64@g.o
From: "Mark Knecht" <markknecht@...>
Subject: Re: nfs mount has now become read-only
Date: Tue, 4 Apr 2006 15:52:30 -0700
Thanks Sami!

On 4/3/06, Sami Samhuri <sami@...> wrote:
> Mark Knecht wrote:
> > Hello,
> [...]
> >    There have been no changes or updates of any kind to the remote
> > machine that has the NFS directory exported. Normal updates have been
> > occurring on my AMD64 machine so presumably the problem is on this
> > machine as none of the remote files are writable anymore. One thing I
> > notice is that on the remote machine there are some directories and
> > files which have user names and some which only have numbers like 501,
> > 502, etc.
> >
> >    Where would I start looking for what's changed?
>
> The file system stores a user id for the owner and group. ls looks up the user
> id in /etc/passwd and shows you the username instead. You can make ls show user
> id's instead of names with `ls -ln`.

OK, I basically knew this...

>
> When you see numbers such as 501 in the directory listing that means the user or
> group who had that user id is not found in /etc/passwd or /etc/group.

OK, that means it's using the passwd file local to that specific
machine then. Here's what I have:

NFS Server: Only one user account:

mythtv:x:1000:100::/home/mythtv:/bin/bash

MythTV Backend Server: 3 user accounts:

mark:x:500:100:Mark:/home/mark:/bin/bash
evelyn:x:501:100:Evelyn:/home/evelyn:/bin/bash
matt:x:502:100:Matt:/home/matt:/bin/bash

AMD64 machine: 2 user accounts:

mark:x:1000:100::/home/mark:/bin/bash
matt:x:1001:100::/home/matt:/bin/bash

>
> The user id's on all the machines you use with NFS have to be the same. I found
> this in the HP-UX documentation via google:
>
>  >>>> From: http://docs.hp.com/en/5991-1153/ch02s01.html#bghdjbfa
>
> To Set User IDs and Group IDs (if neither NIS nor NIS+ is used)
>
> * Create one /etc/passwd file and one /etc/group file that contain all the users
> and groups on the network, and then copy these files to all the machines on the
> network.
>
>         or
>
> * Edit the /etc/passwd and /etc/group files on each machine to ensure that the
> following conditions are true:
>
>    o Each user has the same user ID on all machines where that user has an account.
>
>    o No two users anywhere on the network have the same user ID.
>
>    o Each group has the same group ID on all machines where that group exists.
>
>    o No two groups on the network have the same group ID.
>
> When users request NFS access to remote files, their user IDs and group IDs are
> used to check file ownership and permissions, just as they are locally.
>
> If a user has one user ID on an NFS client and a different user ID on an NFS
> server, the server will not grant the user access to his or her files on the
> server, because it thinks the files belong to someone else.
>
> If a user on one machine has the same user ID as a user on another machine, one
> user may gain access to the other user's files.
>
>  >>>>
>
> Perhaps your user ids don't match. I've been bitten by this before sharing
> between Mac OS X, Gentoo, and Ubuntu. Hope this helps.

OK, I think you've hit on a potential problem here. Problem is what is
the best way to address this on machines that have been running for a
long time? Can I safely edit /etc/passwd and /etc/group and then do
chown -R commands to change the ownership of files on the systems
after I make all the IDs and groups identical?

Thanks,
Mark


>
> --
> Sam
> --
> gentoo-amd64@g.o mailing list
>
>

-- 
gentoo-amd64@g.o mailing list


Replies:
Re: nfs mount has now become read-only
-- Sami Samhuri
Re: nfs mount has now become read-only
-- Conway S. Smith
References:
nfs mount has now become read-only
-- Mark Knecht
Re: nfs mount has now become read-only
-- Sami Samhuri
Navigation:
Lists: gentoo-amd64: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: nfs mount has now become read-only
Next by thread:
Re: nfs mount has now become read-only
Previous by date:
Re: nfs mount has now become read-only
Next by date:
Re: nfs mount has now become read-only


Updated Jun 17, 2009

Summary: Archive of the gentoo-amd64 mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.