当我输入 klist 时,它仅显示主用户名和领域:
> klist -a
Ticket cache: FILE:...
Default principal: [email protected]
Valid starting Expires Service principal
04/30/2017 21:03:00 05/01/2017 07:03:00 primary/[email protected]
renew until 05/07/2017 21:02:56
Addresses: (none)
默认主体没有包含实例名称。
如何在 klist 中显示它?或者它在我的系统中缺失?
多谢!
答案1
实例主体只是另一个主体。如果凭据缓存正在使用一个,那么这一点显而易见。由于事实并非如此,因此可以合理地假设系统未配置为在此特定情况下使用。还请注意,用户主体拥有实例的情况并不常见,而服务器主体拥有实例的情况却很常见。
以下是用户和进程的凭证缓存sssd
。
$ klist
Ticket cache: FILE:/tmp/krb5cc_1234_WAE7Uw
Default principal: [email protected]
Valid starting Expires Service principal
05/02/2017 09:35:03 05/02/2017 21:35:03 krbtgt/[email protected]
renew until 05/03/2017 09:35:03
05/02/2017 09:54:53 05/02/2017 21:35:03 ldap/ldap2.example.com@
renew until 05/03/2017 09:35:03
05/02/2017 09:54:53 05/02/2017 21:35:03 ldap/[email protected]
renew until 05/03/2017 09:35:03
05/02/2017 09:55:04 05/02/2017 21:35:03 ldap/ldap1.example.com@
renew until 05/03/2017 09:35:03
05/02/2017 09:55:04 05/02/2017 21:35:03 ldap/[email protected]
renew until 05/03/2017 09:35:03
$ sudo klist -c /tmp/krb5ccmachine_EXAMPLE.COM
icket cache: FILE:/tmp/krb5ccmachine_EXAMPLE.COM
Default principal: host/[email protected]
Valid starting Expires Service principal
05/02/2017 01:37:44 05/02/2017 13:37:44 krbtgt/[email protected]
05/02/2017 01:37:44 05/02/2017 13:37:44 nfs/nfs1.example.com@
05/02/2017 01:37:44 05/02/2017 13:37:44 nfs/[email protected]