最终,我试图通过gcsfuse将Centos 7.6上的主目录挂载到GCS存储桶中。不幸的是,我偶然发现了问题,不仅不能使gcsfuse与pam_mount一起工作,而且可以使pam_mount成为一个简单的例子。我已经调查了互联网并找到了一些示例,但看不到我在做什么错。这是我的琐碎配置:
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<!--
See pam_mount.conf(5) for a description.
-->
<pam_mount>
<!-- debug should come before everything else,
since this file is still processed in a single pass
from top-to-bottom -->
<debug enable="1" />
<!-- Volume definitions -->
<volume
mountpoint="~/tmp"
path="/tmp"
options="bind"
/>
<!-- pam_mount parameters: General tunables -->
<luserconf name=".pam_mount.conf.xml" />
<!-- Note that commenting out mntoptions will give you the defaults.
You will need to explicitly initialize it with the empty string
to reset the defaults to nothing. -->
<mntoptions allow="bind,nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
<!--
<mntoptions deny="suid,dev" />
<mntoptions allow="*" />
<mntoptions deny="*" />
-->
<mntoptions require="nosuid,nodev" />
<!-- requires ofl from hxtools to be present -->
<logout wait="0" hup="no" term="no" kill="no" />
<!-- pam_mount parameters: Volume-related -->
<mkmountpoint enable="1" remove="true" />
</pam_mount>
当我使用此配置登录时,我知道pam_mount已加载,因为登录提示符更改为pam_mount password:
,并将这些行添加到了日志中。
(rdconf1.c:756): path to luserconf set to /root/.pam_mount.conf.xml
(pam_mount.c:365): pam_mount 2.16: entering auth stage
但这就是全部。 <volume/>
标签中指定的安装未安装,我找不到任何错误。我开始尝试进行GCS挂载,但通过故障排除,我发现似乎没有任何挂载可用。我可以从命令行运行gcsfuse
很好...
所以,我猜了2个问题:
在此先感谢您提供的任何建议。