{"id":3124,"date":"2022-12-20T16:43:32","date_gmt":"2022-12-20T19:43:32","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/nfsidmap-man8\/"},"modified":"2022-12-20T16:43:32","modified_gmt":"2022-12-20T19:43:32","slug":"nfsidmap-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/nfsidmap-man8\/","title":{"rendered":"nfsidmap (man8)"},"content":{"rendered":"<h1 align=\"center\">nfsidmap<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#CONFIGURING\">CONFIGURING<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">nfsidmap \u2212 The NFS idmapper upcall program<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>nfsidmap [-v] [-t timeout] key desc <br \/> nfsidmap [-v] [-c] <br \/> nfsidmap [-v] [-u|-g|-r user] <br \/> nfsidmap -d <br \/> nfsidmap -l <br \/> nfsidmap -h<\/b><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The NFSv4 protocol represents the local system\u2019s UID and GID values on the wire as strings of the form <i>user@domain<\/i>. The process of translating from UID to string and string to UID is referred to as &#8220;ID mapping.&#8221;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The system derives the <i>user<\/i> part of the string by performing a password or group lookup. The lookup mechanism is configured in <i>\/etc\/idmapd.conf<\/i>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">By default, the <i>domain<\/i> part of the string is the system\u2019s DNS domain name. It can also be specified in <i>\/etc\/idmapd.conf<\/i> if the system is multi-homed, or if the system\u2019s DNS domain name does not match the name of the system\u2019s Kerberos realm.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">When the domain is not specified in <i>\/etc\/idmapd.conf<\/i> the local DNS server will be queried for the <i>_nfsv4idmapdomain<\/i> text record. If the record exists that will be used as the domain. When the record does not exist, the domain part of the DNS domain will used.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>\/usr\/sbin\/nfsidmap<\/i> program performs translations on behalf of the kernel. The kernel uses the request-key mechanism to perform an upcall. <i>\/usr\/sbin\/nfsidmap<\/i> is invoked by \/sbin\/request-key, performs the translation, and initializes a key with the resulting information. The kernel then caches the translation results in the key.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>nfsidmap<\/i> can also clear cached ID map results in the kernel, or revoke one particular key. An incorrect cached key can result in file and directory ownership reverting to &#8220;nobody&#8221; on NFSv4 mount points.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">In addition, the <b>-d<\/b> and <b>-l<\/b> options are available to help diagnose misconfigurations. They have no effect on the keyring containing ID mapping results.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><b>-c<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p style=\"margin-top: 1em\">Clear the keyring of all the keys.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>-d<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>Display the system\u2019s effective NFSv4 domain name on <i>stdout<\/i>.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>-g user<\/b><\/p>\n<p style=\"margin-left:22%;\">Revoke the gid key of the given user.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>-h<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>Display usage message.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>-l<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>Display on <i>stdout<\/i> all keys currently in the keyring used to cache ID mapping results. These keys are visible only to the superuser.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>-r user<\/b><\/p>\n<p style=\"margin-left:22%;\">Revoke both the uid and gid key of the given user.<\/p>\n<p style=\"margin-left:11%;\"><b>-t timeout<\/b><\/p>\n<p style=\"margin-left:22%;\">Set the expiration timer, in seconds, on the key. The default is 600 seconds (10 mins).<\/p>\n<p style=\"margin-left:11%;\"><b>-u user<\/b><\/p>\n<p style=\"margin-left:22%;\">Revoke the uid key of the given user.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>-v<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>Increases the verbosity of the output to syslog (can be specified multiple times).<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<h2>CONFIGURING <a name=\"CONFIGURING\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The file <i>\/etc\/request-key.conf<\/i> will need to be modified so <i>\/sbin\/request-key<\/i> can properly direct the upcall. The following line should be added before a call to keyctl negate:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">create id_resolver bodies manpages.csv script_extrae_body.sh script.sh usr bodies manpages.csv script_extrae_body.sh script.sh usr \/usr\/sbin\/nfsidmap -t 600 %k %d<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This will direct all id_resolver requests to the program <i>\/usr\/sbin\/nfsidmap.<\/i> The <b>-t 600<\/b> defines how many seconds into the future the key will expire. This is an optional parameter for <i>\/usr\/sbin\/nfsidmap<\/i> and will default to 600 seconds when not specified.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The idmapper system uses four key descriptions:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">uid: Find the UID for the given user <br \/> gid: Find the GID for the given group <br \/> user: Find the user name for the given UID <br \/> group: Find the group name for the given GID<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">You can choose to handle any of these individually, rather than using the generic upcall program. If you would like to use your own program for a uid lookup then you would edit your request-key.conf so it looks similar to this:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">create id_resolver uid:* bodies manpages.csv script_extrae_body.sh script.sh usr \/some\/other\/program %k %d <br \/> create id_resolver bodies manpages.csv script_extrae_body.sh script.sh usr bodies manpages.csv script_extrae_body.sh script.sh usr \/usr\/sbin\/nfsidmap %k %d<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Notice that the new line was added above the line for the generic program. request-key will find the first matching line and run the corresponding program. In this case, \/some\/other\/program will handle all uid lookups, and \/usr\/sbin\/nfsidmap will handle gid, user, and group lookups.<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>\/etc\/idmapd.conf<\/i><\/p>\n<p style=\"margin-left:22%;\">ID mapping configuration file<\/p>\n<p style=\"margin-left:11%;\"><i>\/etc\/request-key.conf<\/i><\/p>\n<p style=\"margin-left:22%;\">Request key configuration file<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>idmapd.conf<\/b>(5), <b>request-key<\/b>(8)<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Bryan Schumaker, <bjschuma@netapp.com><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  nfsidmap \u2212 The NFS idmapper upcall program <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,270],"class_list":["post-3124","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-nfsidmap"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3124"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3124\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}