我有一个 Kerberized NFS 文件系统,我们正尝试从 Ubuntu 16.04 客户端访问它。服务器是 RHEL7。我们可以成功挂载它(以 root 身份):
mount -t nfs4 -o sec=krb5 colossal.ipa.localdomain:/export/home /mnt
我可以以 root 身份成功运行“df”或“ls /mnt”,但当我尝试通过用户account('username@localdomain'),rpc.gssd 输出错误:
ERROR: GSS-API: error in gss_acquire_cred(): GSS_S_FAILURE (Unspecified GSS failure. Minor code may provide more information) - Can't find client principal username@localdomain in cache collection
rpc.gssd 的完整调试输出(包括 KRB5_TRACE=/dev/stdout)是:
# rpc.gssd -f -v -v -v -r -r -r Warning: rpcsec_gss library does not support setting debug level beginning poll [...]
handling gssd upcall (/run/rpc_pipefs/nfs/clnt0)
handle_gssd_upcall: 'mech=krb5 uid=1388813135 enctypes=18,17,16,23,3,1,2 '
handling krb5 upcall (/run/rpc_pipefs/nfs/clnt0)
process_krb5_upcall: service is '<null>'
[28643] 1501554205.58843: Retrieving username@localdomain from FILE:/etc/krb5/user/0/client.keytab (vno 0, enctype 0) with result: 2/Key table file '/etc/krb5/user/0/client.keytab' not found
ERROR: GSS-API: error in gss_acquire_cred(): GSS_S_FAILURE (Unspecified GSS failure. Minor code may provide more information) - Can't find client principal username@localdomain in cache collection
getting credentials for client with uid 1388813135 for server colossal.ipa.localdomain
WARNING: Failed to create krb5 context for user with uid 1388813135 for server colossal.ipa.localdomain
doing error downcall
‘username@localdomain’ 在 LOCALDOMAIN 中有一个 Kerberos TGT:
$ klist Ticket cache: KEYRING:persistent:1388813135:1388813135 Default principal: username@LOCALDOMAIN Valid starting Expires Service principal 01/08/17 12:23:15 01/08/17 22:23:15 krbtgt/LOCALDOMAIN@LOCALDOMAIN renew until 02/08/17 12:23:13
我不清楚为什么 rpc.gssd 尝试读取“/etc/krb5/user/0/client.keytab”?ccache 位于内核密钥环中。
我不知道这是否重要,但用户帐户是通过 AD 信任通过 sssd/IPA 获得的,并且在 kerberos 领域 LOCALDOMAIN(AD 域)中具有“username@localdomain”的用户名。
(我能够在 RHEL7 NFS 客户端上成功完成此操作)
关于这里可能存在什么问题,有什么提示吗?
答案1
根据https://www.redhat.com/archives/freeipa-users/2017-March/msg00049.htmlrpc.gssd 在 Ubuntu 16.04 中没有内核密钥环支持。
在 /etc/krb5.conf 中您有:default_ccache_name = KEYRING:persistent:%{uid}
删除该行并重新启动,之后 nfs 挂载应该可以工作。它今天对我来说有效 :-)