TMAegisBeta
More rules for yugabytedb

YugabyteDB

TMA-YUGABYTEDB-1.4

Ensure a separate user and group exist for YugabyteDB

MediumLevel 2Automatedyugabytedb

Description

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.

How it is checked

Audit method: Shell command

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
Expected output
compliant

How it is fixed

Fix method: Guidance or infrastructure patch

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

Properties

Operating systems
Any
Tags
yugabytedbservice-account
Reference
CIS YugabyteDB Benchmark v2.0.0 - 1.4 Ensure a separate user and group exist for YugabyteDB

Check this host

Run this on a machine you are allowed to audit. The scan is read-only.

shell
tmaegis scan --target yugabytedb --level 2