大网数据广告活动
服务器运维问答

Root access to kerberized NFSv4 host on Ubuntu

· 52CE 我爱测

I have a kerberized NFSv4 setup working well under Ubuntu for regular users, but I cannot get it working for root. For most systems, I do not want to allow root access, but I have a couple servers where root access over NFS to th…

问题原文

原帖链接 · nrb · CC BY-SA 3.0

I have a kerberized NFSv4 setup working well under Ubuntu for regular users, but I cannot get it working for root.

For most systems, I do not want to allow root access, but I have a couple servers where root access over NFS to this file server is mandatory.

I know that root on a given client uses the client's machine identity, rather than an ordinary kerberos principal.

What I can't figure out is: how can I equate a given machine identity with root access on the server? This seems possible under AIX and Solaris (with root= in the server's export file), but not linux.

I realize that I can allow "sys" authentication for only the hosts that need it and keep krb5 in place for all the others, but I would like to understand how to do it within the context of a fully kerberized environment.

Thanks,

nrb

P.S. I am using no_root_squash.

已采纳解答

原帖链接 · nrb · CC BY-SA 3.0

Well, here's a solution that works. It's not the only one, but it's the cleanest one in my opinion.

Provide a static mapping in the server's idmapd.conf file which equates the machine credentials of the client with the root account on the server.

You must also tell idmapd to check for static mappings first. The relevant snippet from my server config is:

[Translation]
GSS-Methods = static,nsswitch

[Static]
nfs/[email omitted] = root

As a note, the nfs client will go through the /etc/krb5.keytab looking for keys in (at least) the following order:

  • root/[email omitted]
  • nfs/[email omitted]
  • host/[email omitted]

It takes the first one and uses that. This is the name you must use in the Static section of the idmapd.conf file on the server.

nrb

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-07-27)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。