]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - usr.sbin/nfsuserd/nfsuserd.8
MFC: r320659
[FreeBSD/stable/10.git] / usr.sbin / nfsuserd / nfsuserd.8
1 .\" Copyright (c) 2009 Rick Macklem, University of Guelph
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd July 4, 2017
28 .Dt NFSUSERD 8
29 .Os
30 .Sh NAME
31 .Nm nfsuserd
32 .Nd load user and group information into the kernel for
33 .Tn NFSv4
34 services plus support manage-gids for all NFS versions
35 .Sh SYNOPSIS
36 .Nm nfsuserd
37 .Op Fl domain Ar domain_name
38 .Op Fl usertimeout Ar minutes
39 .Op Fl usermax Ar max_cache_size
40 .Op Fl verbose
41 .Op Fl force
42 .Op Fl manage-gids
43 .Op Ar num_servers
44 .Sh DESCRIPTION
45 .Nm
46 loads user and group information into the kernel for NFSv4.
47 It must be running for NFSv4 to function correctly, either client or server.
48 It also provides support for manage-gids and must be running on the server if
49 this is being used for any version of NFS.
50 .Pp
51 Upon startup, it loads the machines DNS domain name, plus timeout and
52 cache size limit into the kernel. It then preloads the cache with group
53 and user information, up to the cache size limit and forks off N children
54 (default 4), that service requests from the kernel for cache misses. The
55 master server is there for the sole purpose of killing off the slaves.
56 To stop the nfsuserd, send a SIGUSR1 to the master server.
57 .Pp
58 The following options are available:
59 .Bl -tag -width Ds
60 .It Fl domain Ar domain_name
61 This option allows you to override the default DNS domain name, which
62 is acquired by taking either the suffix on the machine's hostname or,
63 if that name is not a fully qualified host name, the canonical name as
64 reported by
65 .Xr getaddrinfo 3 .
66 .It Fl usertimeout Ar minutes
67 Overrides the default timeout for cache entries, in minutes.
68 The longer the
69 time out, the better the performance, but the longer it takes for replaced
70 entries to be seen. If your user/group database management system almost
71 never re-uses the same names or id numbers, a large timeout is recommended.
72 The default is 1 minute.
73 .It Fl usermax Ar max_cache_size
74 Overrides the default upper bound on the cache size. The larger the cache,
75 the more kernel memory is used, but the better the performance. If your
76 system can afford the memory use, make this the sum of the number of
77 entries in your group and password databases.
78 The default is 200 entries.
79 .It Fl verbose
80 When set, the server logs a bunch of information to syslog.
81 .It Fl force
82 This flag option must be set to restart the daemon after it has gone away
83 abnormally and refuses to start, because it thinks nfsuserd is already
84 running.
85 .It Fl manage-gids
86 This flag enables manage-gids for the NFS server
87 .Xr nfsd 8 .
88 When this is enabled, all NFS requests using
89 AUTH_SYS authentication take the uid from the RPC request
90 and uses the group list for that uid provided by
91 .Xr getgrouplist 3
92 on the server instead of the list of groups provided in the RPC authenticator.
93 This can be used to avoid the 16 group limit for AUTH_SYS.
94 .It Ar num_servers
95 Specifies how many servers to create (max 20).
96 The default of 4 may be sufficient. You should run enough servers, so that
97 .Xr ps 1
98 shows almost no running time for one or two of the slaves after the system
99 has been running for a long period. Running too few will have a major
100 performance impact, whereas running too many will only tie up some resources,
101 such as a process table entry and swap space.
102 .El
103 .Sh SEE ALSO
104 .Xr getgrent 3 ,
105 .Xr getgrouplist 3 ,
106 .Xr getpwent 3 ,
107 .Xr nfsv4 4 ,
108 .Xr group 5 ,
109 .Xr passwd 5 ,
110 .Xr nfsd 8 .
111 .Sh HISTORY
112 The
113 .Nm
114 utility was introduced with the NFSv4 experimental subsystem in 2009.
115 .Sh BUGS
116 The
117 .Nm
118 use
119 .Xr getgrent 3 ,
120 .Xr getgrouplist 3
121 and
122 .Xr getpwent 3
123 library calls to resolve requests and will hang if the servers handling
124 those requests fail and the library functions don't return. See
125 .Xr group 5
126 and
127 .Xr passwd 5
128 for more information on how the databases are accessed.
129 .Pp
130 Since the kernel communicates with the
131 .Nm
132 daemon via an upcall that uses the IP address 127.0.0.1, it does not work correctly when
133 .Xr jail 8
134 are used and can crash the system.