]> git.decadent.org.uk Git - nfs-utils.git/blob - utils/nfsidmap/nfsidmap.man
c67aab6087c8535796e2740b52d5148158a23e1c
[nfs-utils.git] / utils / nfsidmap / nfsidmap.man
1 .\"
2 .\"@(#)nfsidmap(8) - The NFS idmapper upcall program
3 .\"
4 .\" Copyright (C) 2010 Bryan Schumaker <bjschuma@netapp.com>
5 .TH nfsidmap 5 "1 October 2010"
6 .SH NAME
7 nfsidmap \- The NFS idmapper upcall program
8 .SH SYNOPSIS
9 .B "nfsidmap [-v] [-t timeout] key desc"
10 .SH DESCRIPTION
11 The file
12 .I /usr/sbin/nfsidmap
13 is used by the NFS idmapper to translate user and group ids into names, and to
14 translate user and group names into ids. Idmapper uses request-key to perform
15 the upcall and cache the result.
16 .I /usr/sbin/nfsidmap
17 should only be called by request-key, and will perform the translation and
18 initialize a key with the resulting information.
19 .SH OPTIONS
20 .TP
21 .B -t timeout
22 Set the expiration timer, in seconds, on the key.
23 The default is 600 seconds (10 mins).
24 .TP
25 .B -v
26 Increases the verbosity of the output to syslog 
27 (can be specified multiple times).
28 .SH CONFIGURING
29 The file
30 .I /etc/request-key.conf
31 will need to be modified so
32 .I /sbin/request-key
33 can properly direct the upcall. The following line should be added before a call
34 to keyctl negate:
35 .PP
36 create  id_resolver     *       *       /usr/sbin/nfsidmap -t 600 %k %d 
37 .PP
38 This will direct all id_resolver requests to the program
39 .I /usr/sbin/nfsidmap.
40 The 
41 .B -t 600 
42 defines how many seconds into the future the key will
43 expire.  This is an optional parameter for
44 .I /usr/sbin/nfsidmap
45 and will default to 600 seconds when not specified.
46 .PP
47 The idmapper system uses four key descriptions:
48 .PP
49           uid: Find the UID for the given user
50 .br
51           gid: Find the GID for the given group
52 .br
53          user: Find the user name for the given UID
54 .br
55         group: Find the group name for the given GID
56 .PP
57 You can choose to handle any of these individually, rather than using the
58 generic upcall program.  If you would like to use your own program for a uid
59 lookup then you would edit your request-key.conf so it looks similar to this:
60 .PP
61 create  id_resolver     uid:*   *       /some/other/program %k %d
62 .br
63 create  id_resolver     *               *       /usr/sbin/nfsidmap %k %d
64 .PP
65 Notice that the new line was added above the line for the generic program.
66 request-key will find the first matching line and run the corresponding program.
67 In this case, /some/other/program will handle all uid lookups, and
68 /usr/sbin/nfsidmap will handle gid, user, and group lookups.
69 .SH AUTHOR
70 Bryan Schumaker, <bjschuma@netapp.com>