代码之家  ›  专栏  ›  技术社区  ›  naXa stands with Ukraine

如何列出cassandrashell中的所有用户?

  •  1
  • naXa stands with Ukraine  · 技术社区  · 7 年前

    2 回复  |  直到 7 年前
        1
  •  8
  •   Laxmikant    7 年前

    cassandra2.2以后的CQL使用数据库角色来表示用户和用户组。所以要列出用户,请相应地使用下面的命令。

    LIST USERS;  -- cassandra version < 2.2
    
    LIST ROLES;  -- cassandra version >= 2.2
    
        2
  •  3
  •   naXa stands with Ukraine    7 年前

    你能做到的 LIST USERS;

    输出为:

     name      | super
    -----------+-------
     cassandra |  True
         boone | False
         akers |  True
      spillman | False
    

    https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlListUsers.html

        3
  •  2
  •   Nicola Ben    5 年前

    CQL 3.x LIST USERS命令无效 已弃用

    您可以通过查询检索用户/角色:

    SELECT * FROM system_auth.roles;
    

    裁判: https://docs.datastax.com/en/cql-oss/3.x/cql/cql_reference/cqlListUsers.html

    推荐文章