From 3592bb3989e3a8a63f7a295e17a720c5f9923c76 Mon Sep 17 00:00:00 2001 From: Athmane Madjoudj Date: Sep 17 2011 22:10:16 +0000 Subject: Add passwd/group sanity checks --- diff --git a/tests/p_setup/group_file_test.sh b/tests/p_setup/group_file_test.sh new file mode 100755 index 0000000..4bb9f53 --- /dev/null +++ b/tests/p_setup/group_file_test.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Author: Athmane Madjoudj + +t_Log "Running $0 - group file sanity check." + +grep -q 'root:x:0' /etc/group && \ +grep -q 'bin:x:1' /etc/group && \ +grep -q 'daemon:x:2' /etc/group && \ +grep -q 'nobody:x:99' /etc/group + + +t_CheckExitStatus $? diff --git a/tests/p_setup/passwd_file_test.sh b/tests/p_setup/passwd_file_test.sh new file mode 100755 index 0000000..df21a16 --- /dev/null +++ b/tests/p_setup/passwd_file_test.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Author: Athmane Madjoudj + +t_Log "Running $0 - passwd file sanity check." + +grep -q 'root:x:0' /etc/passwd && \ +grep -q 'nobody:x:99' /etc/passwd + + +t_CheckExitStatus $?