首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Kerberos服务票是由mount.cifs还是内核缓存的?

Kerberos服务票是由mount.cifs还是内核缓存的?
EN

Server Fault用户
提问于 2018-06-04 18:04:40
回答 1查看 1.6K关注 0票数 1

当使用krbr5i挂载CIFS共享,然后用kdestroy销毁Kerberos票证时,仍然可以在同一服务器上挂载其他共享。这怎麽可能?mount.cifs不需要再次将服务票发送到共享服务器吗?票藏在某处了吗?这是由内核(或cifs.upcall)处理的吗?

在卸载所有股票后,mount.cifs将失败(正如预期的那样)。

复制步骤:

代码语言:javascript
复制
$ # Aquire tgt:
$ kinit
Password for sahisb@DOMAIN.EXAMPLE.COM:
$ # Mount share1 and get cifs ticket:
$ sudo mount.cifs -v -o sec=krb5i,cache=strict,rw,user=sahisb,cruid=$UID,cifsacl,nounix,multiuser,vers=2.1 //dc.domain.example.com/share1 /share1
mount.cifs kernel mount options: ip=[redacted],unc=\\dc.domain.example.com\share1,sec=krb5i,cache=strict,cifsacl,nounix,multiuser,vers=2.1,cruid=1297401199,user=sahisb,pass=********
$ # Destroy tgt and cifs ticket:
$ kdestroy
$ # Mount share2. I expected this to fail but it will succeed:
$ sudo mount.cifs -v -o sec=krb5i,cache=strict,rw,user=sahisb,cruid=$UID,cifsacl,nounix,multiuser,vers=2.1 //dc.domain.example.com/share2 /share2
mount.cifs kernel mount options: ip=[redacted],unc=\\dc.domain.example.com\share2,sec=krb5i,cache=strict,cifsacl,nounix,multiuser,vers=2.1,cruid=1297401199,user=sahisb,pass=********

此时klist仍然找不到凭据缓存。现在,让我们尝试卸载这些共享并重新挂载它们:

代码语言:javascript
复制
$ umount /share1
$ umount /share2
$ sudo mount.cifs -v -o sec=krb5i,cache=strict,rw,user=sahisb,cruid=$UID,cifsacl,nounix,multiuser,vers=2.1 //dc.domain.example.com/share2 /share2
mount.cifs kernel mount options: ip=[redacted],unc=\\dc.domain.example.com\share2,sec=krb5i,cache=strict,cifsacl,nounix,multiuser,vers=2.1,cruid=1297401199,user=sahisb,pass=********
mount error(126): Required key not available

如预期的那样失败。

EN

回答 1

Server Fault用户

回答已采纳

发布于 2018-06-06 16:25:43

在挂载CIFS/SMB共享时,将创建会话(如果凭据(在本例中为kerberos服务票证)是正确的)。在创建会话之后,我们就不必再验证自己了。

由于share1和share2是由同一个服务(dc.domain.example.com)提供的,所以对这些文件的所有请求都使用相同的会话。

票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/915134

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档