TMAegis
更多 ros 规则

ROS (Robot Operating System)

TMA-ROS1-2.2.1.3

Ensure chrony is configured

中级别 1自动化ros

说明

chrony is a daemon which implements the Network Time Protocol (NTP) is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on chrony can be found at http://chrony.tuxfamily.org/. chrony can be configured to be a client and/or a server. Applies when chrony is used: the audit requires a server or pool line and chronyd running as the chrony (_chrony) user. Host-level control from the CIS ROS Melodic benchmark (Ubuntu 18.04 robot hosts); run as root.

检查方式

审计方法: Shell 命令

shell
f=/etc/chrony/chrony.conf; [ -f "$f" ] || f=/etc/chrony.conf
grep -Eqs '^(server|pool)\s' "$f" /etc/chrony/sources.d/*.sources || { echo 'no server/pool in chrony configuration'; exit 1; }
u=$(ps -eo user=,comm= | awk '$2 == "chronyd" {print $1; exit}')
case "$u" in _chrony|chrony) echo compliant ;; '') echo 'chronyd is not running' ;; *) echo "chronyd runs as $u" ;; esac
预期输出
compliant

修复方式

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

Add or edit server or pool lines to /etc/chrony.conf as appropriate: server <remote-server> Configure chrony to run as the chrony user by configuring the appropriate startup script for your distribution. Startup scripts are typically stored in /etc/init.d or /etc/systemd.

属性

操作系统
任意
标签
rosros1melodicservices
参考
CIS ROS Melodic Benchmark v1.0.0 - 2.2.1.3 Ensure chrony is configured

检查本机

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

shell
tmaegis scan --target ros