The node_exporter
user should be non-privileged with a shell of /sbin/nologin
. This user will own the necessary directories and will run the service.
sudo useradd --system --shell /sbin/nologin --no-create-home --home-dir /var/lib/node_exporter node_exporter