From 3d8b6c3ff65ee70cef04add50b816a869c8629ca Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: Dec 01 2012 20:23:49 +0000 Subject: fixed p_passwd/20_root_tests test as option -e does not exist on C5 --- diff --git a/tests/p_passwd/20_root_tests b/tests/p_passwd/20_root_tests index c2cb9a1..078d0f1 100755 --- a/tests/p_passwd/20_root_tests +++ b/tests/p_passwd/20_root_tests @@ -44,15 +44,19 @@ fi # Check that passwd -e expires an account. Field 3 of /etc/shadow is set to 0 t_Log "Check password can be expired" -passwd -e passtest &>/dev/null - -if [ $? -eq "0" ] -then +if [ $centos_ver == '5' ] + then + t_Log 'This is a C5 system - option -e does not exist - skipping' +else + passwd -e passtest &>/dev/null + if [ $? -eq "0" ] + then getent shadow passtest | cut -f3 -d: | grep '^0' &>/dev/null t_CheckExitStatus $? echo passtest | passwd --stdin passtest &>/dev/null -else + else ExitFail + fi fi # Check that passwd -n, -x, -w -i set the mindays, maxdays, warndays and