5.3.2. 将用户添加到密钥环
当您向 Ceph 存储集群中添加用户时,您可以使用 get
流程检索用户、密钥和功能,然后将用户保存到密钥环文件中。
当您只想在每个密钥环使用一个用户时,带有 -o
选项的获取 User_ 过程将以 keyring 文件格式保存输出。例如,要为 client.admin
用户创建密钥环,请执行以下操作:
ceph auth get client.admin -o /etc/ceph/ceph.client.admin.keyring
# ceph auth get client.admin -o /etc/ceph/ceph.client.admin.keyring
请注意,我们为单个用户使用推荐的文件格式。
当您要将用户导入到密钥环时,您可以使用 ceph-authtool
指定目标密钥环和源密钥环。例如:
ceph-authtool /etc/ceph/ceph.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
# ceph-authtool /etc/ceph/ceph.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring