一,列出所有用户:
ceph auth list
installed auth entries: mds.ceph-node1 key: AQB/+I5ZFdcwERAAg0eP7SyDg84DZUlvKzBGuA== caps: [mds] allow caps: [mon] allow profile mds caps: [osd] allow rwx osd.0 key: AQD49o5ZCatkBBAAZ31OL9xJ78XYI6sPXb9z7A== caps: [mon] allow profile osd caps: [osd] allow * osd.1 key: AQAA945ZOLBPABAAvAWW5fg7JIfc9z0wfX0wkA== caps: [mon] allow profile osd caps: [osd] allow * osd.2 key: AQAG+I5Z4RvZGRAALVGsS6CYk1x6wVhQ2KRuOw== caps: [mon] allow profile osd caps: [osd] allow * client.admin key: AQCu845ZXt0dExAAatk28a2ILAg4XijF3ax0vg== caps: [mds] allow * caps: [mon] allow * caps: [osd] allow * client.bootstrap-mds key: AQCu845ZIYV0MRAA9e0w3Lo4KDVk6u+IoVfvdQ== caps: [mon] allow profile bootstrap-mds client.bootstrap-mgr key: AQCx845ZJD/wIhAAkfaCX7HsXv5yfXgVn7U0hA== caps: [mon] allow profile bootstrap-mgr client.bootstrap-osd key: AQCu845ZPmxJHRAAH9QK4uowMrvjsUmf/qGEZg== caps: [mon] allow profile bootstrap-osd client.bootstrap-rgw key: AQCu845Z2V0+JxAAVogbhziesxI0K+CksFauIA== caps: [mon] allow profile bootstrap-rgw client.rgw.ceph-node2 key: AQCh+I5ZWM09OxAAE/dlTQNCy2BaZl3RvZ0aWg== caps: [mon] allow rw caps: [osd] allow rwx
二,获得指定用户的信息:
ceph auth get client.admin
[client.admin] key = AQCu845ZXt0dExAAatk28a2ILAg4XijF3ax0vg== caps mds = "allow *" caps mon = "allow *" caps osd = "allow *"
三,新增用户并输出密钥环(用途应该是加到标准密钥环文件,然后,扩散之后,整个群集可用)
ceph auth get-or-create client.george mon 'allow r' osd 'allow rw pool=ceph_data' -o george.keyring
[client.george] key = AQClKJBZFLAhOBAAEyKbPe79NncMe/YucS/sKg==
四,更改用户权限
ceph auth caps client.george mon 'allow rw' osd 'allow rwx pool=ceph_data'
时间: 2024-09-22 15:48:42