You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
QA/tests/p_setup/passwd_file_test.sh

17 lines
298 B

#!/bin/sh
# Author: Athmane Madjoudj <athmanem@gmail.com>
t_Log "Running $0 - passwd file sanity check."
if [ "$centos_ver" -ge 8 ] ;then
nobody_grpid="65534"
else
nobody_grpid="99"
fi
grep -q 'root:x:0' /etc/passwd && \
grep -q "nobody:x:${nobody_grpid}" /etc/passwd
t_CheckExitStatus $?