{"id":3423,"date":"2022-12-20T17:02:38","date_gmt":"2022-12-20T20:02:38","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/rpc-gssd-man8\/"},"modified":"2022-12-20T17:02:38","modified_gmt":"2022-12-20T20:02:38","slug":"rpc-gssd-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/rpc-gssd-man8\/","title":{"rendered":"rpc.gssd (man8)"},"content":{"rendered":"<h1 align=\"center\">rpc.gssd<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#INTRODUCTION\">INTRODUCTION<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#CONFIGURATION FILE\">CONFIGURATION FILE<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHORS\">AUTHORS<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">rpc.gssd \u2212 RPCSEC_GSS daemon<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>rpc.gssd<\/b> [<b>\u2212DfMnlvr<\/b>] [<b>\u2212k<\/b> <i>keytab<\/i>] [<b>\u2212p<\/b> <i>pipefsdir<\/i>] [<b>\u2212d<\/b> <i>ccachedir<\/i>] [<b>\u2212t<\/b> <i>timeout<\/i>] [<b>\u2212R<\/b> <i>realm<\/i>]<\/p>\n<h2>INTRODUCTION <a name=\"INTRODUCTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The RPCSEC_GSS protocol, defined in RFC 5403, is used to provide strong security for RPC-based protocols such as NFS.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Before exchanging RPC requests using RPCSEC_GSS, an RPC client must establish a GSS <i>security context<\/i>. A security context is shared state on each end of a network transport that enables GSS-API security services.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Security contexts are established using <i>security credentials<\/i>. A credential grants temporary access to a secure network service, much as a railway ticket grants temporary access to use a rail service.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A user typically obtains a credential by providing a password to the <b>kinit<\/b>(1) command, or via a PAM library at login time. A credential acquired with a <i>user principal<\/i> is known as a <i>user credential<\/i> (see <b>kerberos<\/b>(1) for more on principals).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Certain operations require a credential that represents no particular user or represents the host itself. This kind of credential is called a <i>machine credential<\/i>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A host establishes its machine credential using a <i>service principal<\/i> whose encrypted password is stored in a local file known as a <i>keytab<\/i>. A machine credential remains effective without user intervention as long as the host can renew it.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Once obtained, credentials are typically stored in local temporary files with well-known pathnames.<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">To establish GSS security contexts using these credential files, the Linux kernel RPC client depends on a userspace daemon called <b>rpc.gssd<\/b>. The <b>rpc.gssd<\/b> daemon uses the rpc_pipefs filesystem to communicate with the kernel.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>User Credentials<\/b> <br \/> When a user authenticates using a command such as <b>kinit<\/b>(1), the resulting credential is stored in a file with a well-known name constructed using the user\u2019s UID.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To interact with an NFS server on behalf of a particular Kerberos-authenticated user, the Linux kernel RPC client requests that <b>rpc.gssd<\/b> initialize a security context with the credential in that user\u2019s credential file.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Typically, credential files are placed in <i>\/tmp<\/i>. However, <b>rpc.gssd<\/b> can search for credential files in more than one directory. See the description of the <b>-d<\/b> option for details.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Machine Credentials <br \/> rpc.gssd<\/b> searches the default keytab, <i>\/etc\/krb5.keytab<\/i>, in the following order for a principal and password to use when establishing the machine credential. For the search, rpc.gssd replaces <hostname> and <REALM> with the local system\u2019s hostname and Kerberos realm.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><HOSTNAME>$@<REALM> <br \/> root\/<hostname>@<REALM> <br \/> nfs\/<hostname>@<REALM> <br \/> host\/<hostname>@<REALM> <br \/> root\/<anyname>@<REALM> <br \/> nfs\/<anyname>@<REALM> <br \/> host\/<anyname>@<REALM><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">rpc.gssd selects one of the <anyname> entries if it does not find a service principal matching the local hostname, e.g. if DHCP assigns the local hostname dynamically. The <anyname> facility enables the use of the same keytab on multiple systems. However, using the same service principal to establish a machine credential on multiple hosts can create unwanted security exposures and is therefore not recommended.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Note that <HOSTNAME>$@<REALM> is a user principal that enables Kerberized NFS when the local system is joined to an Active Directory domain using Samba. The keytab provides the password for this principal.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">You can specify a different keytab by using the <b>-k<\/b> option if <i>\/etc\/krb5.keytab<\/i> does not exist or does not provide one of these principals.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Credentials for UID 0<\/b> <br \/> UID 0 is a special case. By default <b>rpc.gssd<\/b> uses the system\u2019s machine credentials for UID 0 accesses that require GSS authentication. This limits the privileges of the root user when accessing network resources that require authentication.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Specify the <b>-n<\/b> option when starting <b>rpc.gssd<\/b> if you\u2019d like to force the root user to obtain a user credential rather than use the local system\u2019s machine credential.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">When <b>-n<\/b> is specified, the kernel continues to request a GSS context established with a machine credential for NFSv4 operations, such as SETCLIENTID or RENEW, that manage state. If <b>rpc.gssd<\/b> cannot obtain a machine credential (say, the local system has no keytab), NFSv4 operations that require machine credentials will fail.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Encryption types<\/b> <br \/> A realm administrator can choose to add keys encoded in a number of different encryption types to the local system\u2019s keytab. For instance, a host\/ principal might have keys for the <b>aes256-cts-hmac-sha1-96<\/b>, <b>aes128-cts-hmac-sha1-96<\/b>, <b>des3-cbc-sha1<\/b>, and <b>arcfour-hmac<\/b> encryption types. This permits <b>rpc.gssd<\/b> to choose an appropriate encryption type that the target NFS server supports.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">These encryption types are stronger than legacy single-DES encryption types. To interoperate in environments where servers support only weak encryption types, you can restrict your client to use only single-DES encryption types by specifying the <b>-l<\/b> option when starting <b>rpc.gssd<\/b>.<\/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>\u2212D<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p style=\"margin-top: 1em\">The server name passed to GSSAPI for authentication is normally the name exactly as requested. e.g. for NFS it is the server name in the &#8220;servername:\/path&#8221; mount request. Only if this servername appears to be an IP address (IPv4 or IPv6) or an unqualified name (no dots) will a reverse DNS lookup will be performed to get the canoncial server name.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">If <b>\u2212D<\/b> is present, a reverse DNS lookup will <i>always<\/i> be used, even if the server name looks like a canonical name. So it is needed if partially qualified, or non canonical names are regularly used.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">Using <b>\u2212D<\/b> can introduce a security vulnerability, so it is recommended that <b>\u2212D<\/b> not be used, and that canonical names always be used when requesting services.<\/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 style=\"margin-top: 1em\"><b>-f<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p style=\"margin-top: 1em\">Runs <b>rpc.gssd<\/b> in the foreground and sends output to stderr (as opposed to syslogd)<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>-n<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>When specified, UID 0 is forced to obtain user credentials which are used instead of the local system\u2019s machine credentials.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>-k<\/b> <i>keytab<\/i><\/p>\n<p style=\"margin-left:22%;\">Tells <b>rpc.gssd<\/b> to use the keys found in <i>keytab<\/i> to obtain machine credentials. The default value is <i>\/etc\/krb5.keytab<\/i>.<\/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>-l<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>When specified, restricts <b>rpc.gssd<\/b> to sessions to weak encryption types such as <b>des-cbc-crc<\/b>. This option is available only when the local system\u2019s Kerberos library supports settable encryption types.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>-p<\/b> <i>path<\/i><\/p>\n<p style=\"margin-left:22%;\">Tells <b>rpc.gssd<\/b> where to look for the rpc_pipefs filesystem. The default value is <i>\/var\/lib\/nfs\/rpc_pipefs<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>-d<\/b> <i>search-path<\/i><\/p>\n<p style=\"margin-left:22%;\">This option specifies a colon separated list of directories that <b>rpc.gssd<\/b> searches for credential files. The default value is <i>\/tmp:\/run\/user\/%U<\/i>. The literal sequence &#8220;%U&#8221; can be specified to substitue the UID of the user for whom credentials are being searched.<\/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>-M<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>By default, machine credentials are stored in files in the first directory in the credential directory search path (see the <b>-d<\/b> option). When <b>-M<\/b> is set, <b>rpc.gssd<\/b> stores machine credentials in memory instead.<\/p>\n<\/td>\n<\/tr>\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 (can be specified multiple times).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>-r<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>If the RPCSEC_GSS library supports setting debug level, increases the verbosity of the output (can be specified multiple times).<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>-R<\/b> <i>realm<\/i><\/p>\n<p style=\"margin-left:22%;\">Kerberos tickets from this <i>realm<\/i> will be preferred when scanning available credentials cache files to be used to create a context. By default, the default realm, as configured in the Kerberos configuration file, is preferred.<\/p>\n<p style=\"margin-left:11%;\"><b>-t<\/b> <i>timeout<\/i><\/p>\n<p style=\"margin-left:22%;\">Timeout, in seconds, for kernel GSS contexts. This option allows you to force new kernel contexts to be negotiated after <i>timeout<\/i> seconds, which allows changing Kerberos tickets and identities frequently. The default is no explicit timeout, which means the kernel context will live the lifetime of the Kerberos service ticket used in its creation.<\/p>\n<p style=\"margin-left:11%;\"><b>-T timeout<\/b><\/p>\n<p style=\"margin-left:22%;\">Timeout, in seconds, to create an RPC connection with a server while establishing an authenticated gss context for a user. The default timeout is set to 5 seconds. If you get messages like &#8220;WARNING: can\u2019t create tcp rpc_clnt to server %servername% for user with uid %uid%: RPC: Remote system error &#8211; Connection timed out&#8221;, you should consider an increase of this timeout.<\/p>\n<h2>CONFIGURATION FILE <a name=\"CONFIGURATION FILE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Many of the options that can be set on the command line can also be controlled through values set in the <b>[gssd]<\/b> section of the <i>\/etc\/nfs.conf<\/i> configuration file. Values recognized include: <b><br \/> verbosity<\/b><\/p>\n<p style=\"margin-left:22%;\">Value which is equivalent to the number of <b>-v<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>rpc-verbosity<\/b><\/p>\n<p style=\"margin-left:22%;\">Value which is equivalent to the number of <b>-r<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>use-memcache<\/b><\/p>\n<p style=\"margin-left:22%;\">A Boolean flag equivalent to <b>-M<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>use-machine-creds<\/b><\/p>\n<p style=\"margin-left:22%;\">A Boolean flag. Setting to <b>false<\/b> is equivalent to giving the <b>-n<\/b> flag.<\/p>\n<p style=\"margin-left:11%;\"><b>avoid-dns<\/b><\/p>\n<p style=\"margin-left:22%;\">Setting to <b>false<\/b> is equivalent to providing the <b>-D<\/b> flag.<\/p>\n<p style=\"margin-left:11%;\"><b>limit-to-legacy-enctypes<\/b><\/p>\n<p style=\"margin-left:22%;\">Equivalent to <b>-l<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>context-timeout<\/b><\/p>\n<p style=\"margin-left:22%;\">Equivalent to <b>-t<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>rpc-timeout<\/b><\/p>\n<p style=\"margin-left:22%;\">Equivalent to <b>-T<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>keytab-file<\/b><\/p>\n<p style=\"margin-left:22%;\">Equivalent to <b>-k<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>cred-cache-directory<\/b><\/p>\n<p style=\"margin-left:22%;\">Equivalent to <b>-d<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>preferred-realm<\/b><\/p>\n<p style=\"margin-left:22%;\">Equivalent to <b>-R<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">In addtion, the following value is recognized from the <b>[general]<\/b> section: <b><br \/> pipefs-directory<\/b><\/p>\n<p style=\"margin-left:22%;\">Equivalent to <b>-p<\/b>.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>rpc.svcgssd<\/b>(8), <b>kerberos<\/b>(1), <b>kinit<\/b>(1), <b>krb5.conf<\/b>(5)<\/p>\n<h2>AUTHORS <a name=\"AUTHORS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Dug Song <dugsong@umich.edu> <br \/> Andy Adamson <andros@umich.edu> <br \/> Marius Aamodt Eriksen <marius@umich.edu> <br \/> J. Bruce Fields <bfields@umich.edu><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  rpc.gssd \u2212 RPCSEC_GSS daemon <\/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,224],"class_list":["post-3423","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-rpc"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3423","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=3423"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3423\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}