YugabyteDB
TMA-YUGABYTEDB-1.4
Ensure a separate user and group exist for YugabyteDB
MediaNivel 2Automatizadayugabytedb
Descripción
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.
Cómo se verifica
Método de auditoría: Comando de 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- Salida esperada
compliant
Cómo se corrige
Método de corrección: Guía o parche de infraestructura
groupadd yugabyte; useradd -m -d /home/yugabyte -s /bin/bash -g yugabyte -u <UID> yugabyte (use an unused UID).
Propiedades
- Sistemas operativos
- Cualquiera
- Etiquetas
- yugabytedbservice-account
- Referencia
- CIS YugabyteDB Benchmark v2.0.0 - 1.4 Ensure a separate user and group exist for YugabyteDB
Verificar este host
Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.
shell
tmaegis scan --target yugabytedb --level 2