TMAegis
更多 yugabytedb 规则

TMA-YUGABYTEDB-1.4

Ensure a separate user and group exist for YugabyteDB

中级别 2自动化yugabytedb

说明

Create separate userid and group for YugabyteDB. The benchmark rates this recommendation Manual; the automated check covers its objective pass criterion. Passes when the yugabyte group and user exist and the user is a member of the group.

检查方式

审计方法: Shell 命令

shell
g=$(getent group yugabyte) || exit 1; u=$(getent passwd yugabyte) || exit 1; gid=$(printf '%s' "$g" | cut -d: -f3); ugid=$(printf '%s' "$u" | cut -d: -f4); members=$(printf '%s' "$g" | cut -d: -f4); if [ "$gid" = "$ugid" ] || printf '%s' ",$members," | grep -q ',yugabyte,'; then echo compliant; else echo 'user not in group'; fi
预期输出
compliant

修复方式

修复方法: 操作指南或基础设施补丁

groupadd yugabyte; useradd -m -d /home/yugabyte -s /bin/bash -g yugabyte -u <UID> yugabyte (use an unused UID).

属性

操作系统
任意
标签
yugabytedbservice-account
参考
CIS YugabyteDB Benchmark v2.0.0 - 1.4 Ensure a separate user and group exist for YugabyteDB

检查本机

请在您有权审计的机器上运行此命令。扫描为只读操作。

shell
tmaegis scan --target yugabytedb --level 2