summaryrefslogtreecommitdiff
path: root/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/usermod.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/usermod.test')
-rwxr-xr-xtests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/usermod.test58
1 files changed, 0 insertions, 58 deletions
diff --git a/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/usermod.test b/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/usermod.test
deleted file mode 100755
index f62a2924..00000000
--- a/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/usermod.test
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-. ../../../common/config.sh
-. ../../../common/log.sh
-
-log_start "$0" "usermod checks that the shadow file exist for option -f"
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-echo -n "Remove /etc/shadow..."
-rm -f /etc/shadow
-echo "done"
-
-echo -n "Change number of inactive days (usermod -f 10 foo)..."
-usermod -f 10 foo 2>tmp/usage.out && exit 1 || {
- status=$?
-}
-echo "OK"
-
-echo -n "Check returned status ($status)..."
-test "$status" = "2"
-echo "OK"
-
-echo "usermod reported:"
-echo "======================================================================="
-cat tmp/usage.out
-echo "======================================================================="
-echo -n "Check the usage message..."
-diff -au data/usage.out tmp/usage.out
-echo "usage message OK."
-rm -f tmp/usage.out
-
-echo -n "Check the passwd file..."
-../../../common/compare_file.pl config/etc/passwd /etc/passwd
-echo "OK"
-echo -n "Check the group file..."
-../../../common/compare_file.pl config/etc/group /etc/group
-echo "OK"
-echo -n "Check the shadow file..."
-test ! -f /etc/shadow
-echo "OK"
-echo -n "Check the gshadow file..."
-../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
-echo "OK"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-