Operating System - HP-UX
1833380 Members
3682 Online
110052 Solutions
New Discussion

how does nfs know who is the user who attempting to access nfs mount?

 
SOLVED
Go to solution
itai weisman
Super Advisor

how does nfs know who is the user who attempting to access nfs mount?

which node (the exporter or the importer) manage the file access permission? how does it do it?
does user authentication happen in every attempt to access a file or a directory that is being nfs mounted?
does the answer apply to both nfs v2 and v3?
4 REPLIES 4
Karthik S S
Honored Contributor
Solution

Re: how does nfs know who is the user who attempting to access nfs mount?

1. It resolves the user name to user ID from passwd file and or name service like NIS

2. NFS server (from where you export) maintains the access permissions.

3. Authentication happens only once when you the exported directory. Upon a successful mount depending on the permissions of the directory/file the user will be given/denied access.

4. Yes

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
itai weisman
Super Advisor

Re: how does nfs know who is the user who attempting to access nfs mount?

thanks a lot for the quick answer :) - it helped me a lot -
what are the main diffrences between nfs v2 and v3 btw?
Karthik S S
Honored Contributor

Re: how does nfs know who is the user who attempting to access nfs mount?

http://www.faqs.org/rfcs/rfc1813.html

Refer the following section,
1.7 Changes from the NFS version 2 protocol . . . . . . . . 11

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Jim Keeble
Trusted Contributor

Re: how does nfs know who is the user who attempting to access nfs mount?

Regardless of protocol version 2 or 3, mount access is based on hostname or netgroup listed in the /etc/exports file of the server and IP address of the client .

File access, on the other hand, is based strictly on uid and gid numbers assigned, so it is important keep username/uid consistent between client(s) and server. (this is usually accomplished using NIS passwd and group maps. Otherwise uid 101 bob on the client has permissions to use uid 101 fred's files on the server.

One exception to this is the root user. Unless the client's root user is granted access by the "root=client1,client2,..." in the servers export file, uid 0 access will be translated to the uid and gid of the anonymous user on the server side.