nfsserver 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. .TH NFSSERVER 8
  2. .SH NAME
  3. nfsserver, portmapper, pcnfsd, 9auth \- NFS service
  4. .SH SYNOPSIS
  5. .B aux/nfsserver
  6. [
  7. .I rpc-options...
  8. ]
  9. [
  10. .I nfs-options...
  11. ]
  12. .br
  13. .B aux/pcnfsd
  14. [
  15. .I rpc-options...
  16. ]
  17. .br
  18. .B aux/portmapper
  19. [
  20. .I rpc-options...
  21. ]
  22. .SH DESCRIPTION
  23. These programs collectively provide NFS access to Plan 9 file servers.
  24. .IR Nfsserver ,
  25. .IR pcnfsd ,
  26. and
  27. .I portmapper
  28. run on a Plan 9 CPU server, and should be started in that order.
  29. All users on client machines have the
  30. access privileges of the Plan 9 user
  31. .LR none .
  32. .PP
  33. The
  34. .I rpc-options
  35. are all intended for debugging:
  36. .nr zz \w'\f5-a\f2 addr'+2n/1n
  37. .TP \n(zz
  38. .B -r
  39. Reject: answer all RPC requests by returning the
  40. .B AUTH_TOOWEAK
  41. error.
  42. .TP
  43. .B -v
  44. Verbose: show all RPC calls and internal program state, including 9P messages.
  45. (In any case, the program creates a file
  46. .BI /srv/ name .chat
  47. where
  48. .I name
  49. is that of the program; echoing
  50. .L 1
  51. or
  52. .L 0
  53. into this file sets or clears the
  54. .B -v
  55. flag dynamically.)
  56. .TP
  57. .B -D
  58. Debug: show all RPC messages (at a lower level than
  59. .BR -v ).
  60. This flag may be repeated to get more detail.
  61. .TP
  62. .B -C
  63. Turn off caching: do not answer RPC requests using the
  64. RPC reply cache.
  65. .PP
  66. The
  67. .I nfs-options
  68. are:
  69. .TP \n(zz
  70. .BI -a " addr"
  71. Set up NFS service for the 9P server at network address
  72. .IR addr .
  73. .TP
  74. .BI -f " file"
  75. Set up NFS service for the 9P server at
  76. .I file
  77. (typically an entry in
  78. .BR /srv ).
  79. .TP
  80. .B -n
  81. Do not allow per-user authentication.
  82. .TP
  83. .BI -c " file"
  84. .I File
  85. contains the uid/gid map configuration. It is read at startup
  86. and subsequently every hour (or if
  87. .L c
  88. is echoed into
  89. .BR /srv/nfsserver.chat ).
  90. Blank lines or lines beginning with
  91. .L #
  92. are ignored; lines beginning with
  93. .L !
  94. are executed as commands; otherwise lines contain four fields
  95. separated by white space: a regular expression (in the notation of
  96. .IR regexp (6))
  97. for a class of servers, a regular expression for
  98. a class of clients, a file of user id's (in the format of a Unix
  99. password file), and a file of group id's (same format).
  100. .PP
  101. NFS clients must be in the Plan 9
  102. .B /lib/ndb
  103. database.
  104. The machine name is deduced from the IP address via
  105. .BR ndb/query .
  106. The machine name specified in the NFS Unix credentials
  107. is completely ignored.
  108. .PP
  109. .I Pcnfsd
  110. is a toy program that authorizes PC-NFS clients. All clients
  111. are mapped to uid=1, gid=1
  112. .RB ( daemon
  113. on most systems) regardless of name or password.
  114. .SH EXAMPLES
  115. A simple
  116. .B /lib/ndb/nfs
  117. might contain:
  118. .PP
  119. .EX
  120. !9fs tcp!ivy
  121. \&.+ [^.]+\e.cvrd\e.hall\e.edu /n/ivy/etc/passwd /n/ivy/etc/group
  122. .EE
  123. .PP
  124. A typical entry in
  125. .B /rc/bin/cpurc
  126. might be:
  127. .PP
  128. .EX
  129. aux/nfsserver -a il!bootes -a il!fornax -c /lib/ndb/nfs
  130. aux/pcnfsd
  131. aux/portmapper
  132. .EE
  133. .PP
  134. Assuming the CPU server's name is
  135. .BR eduardo ,
  136. the mount commands on the client would be:
  137. .PP
  138. .EX
  139. /etc/mount -o soft,intr eduardo:bootes /n/bootes
  140. /etc/mount -o soft,intr eduardo:fornax /n/fornax
  141. .EE
  142. .PP
  143. Note that a single instance of
  144. .I nfsserver
  145. may provide access to several 9P servers.
  146. .SH FILES
  147. .TF /lib/ndb/nfs
  148. .TP
  149. .B /lib/ndb/nfs
  150. List of uid/gid maps.
  151. .TP
  152. .B /sys/log/nfs
  153. Log file.
  154. .SH SOURCE
  155. .B /sys/src/cmd/9nfs
  156. .SH BUGS
  157. It would be nice to provide authentication for users, but Unix systems
  158. provide too low a level of security to be trusted in a Plan 9 world.
  159. .SH SEE ALSO
  160. RFC1057,
  161. .I "RPC: Remote Procedure Call Protocol Specification, Version 2."
  162. .br
  163. RFC1094,
  164. .I "NFS: Network File System Protocol Specification."