diff --git a/tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/chpasswd.test b/tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/chpasswd.test index 741db99f..26602134 100755 --- a/tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/chpasswd.test +++ b/tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/chpasswd.test @@ -7,7 +7,10 @@ cd $(dirname $0) . ../../../common/config.sh . ../../../common/log.sh -log_start "$0" "chpasswd chanegs the passwd entry if there are no shadow entries" +log_start "$0" "chpasswd changes the passwd entry if there are no shadow entries" +# FIXME: The PAM and !PAM versions differs: +# PAM will create a shadow entry if the shadow file exists +# !PAM will update the passwd entry and leave the shadow file untouched save_config @@ -18,24 +21,9 @@ change_config echo -n "Change nobody's and lp's password..." echo 'nobody:test -lp:test2' | chpasswd 2>tmp/chpasswd.err && exit 1 || { - status=$? -} +lp:test2' | chpasswd echo "OK" -echo -n "Check returned status ($status)..." -test "$status" = "1" -echo "OK" - -echo "chpasswd reported:" -echo "=======================================================================" -cat tmp/chpasswd.err -echo "=======================================================================" -echo -n "Check that there were a failure message..." -diff -au data/chpasswd.err tmp/chpasswd.err -echo "error message OK." -rm -f tmp/chpasswd.err - echo -n "Check the passwd file..." ../../../common/compare_file.pl config/etc/passwd /etc/passwd echo "OK" diff --git a/tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/data/chpasswd.err b/tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/data/chpasswd.err deleted file mode 100644 index 1381d0ee..00000000 --- a/tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/data/chpasswd.err +++ /dev/null @@ -1,3 +0,0 @@ -chpasswd: (user lp) pam_chauthtok() failed, error: -Authentication token manipulation error -chpasswd: (line 2, user lp) password not changed diff --git a/tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/data/passwd b/tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/data/passwd deleted file mode 100644 index e7f6c7b8..00000000 --- a/tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/data/passwd +++ /dev/null @@ -1,19 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:@PASS_DES test2@:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/data/shadow b/tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/data/shadow index 8e105908..090d61ac 100644 --- a/tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/data/shadow +++ b/tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/data/shadow @@ -16,3 +16,4 @@ irc:*:12977:0:99999:7::: gnats:*:12977:0:99999:7::: nobody:@PASS_DES test@:@TODAY@:0:99999:7::: Debian-exim:!:12977:0:99999:7::: +lp:@PASS_DES test2@:@TODAY@:::::: diff --git a/tests/usertools/chpasswd/04_chpasswd_no_shadow_entry/chpasswd.test b/tests/usertools/chpasswd/04_chpasswd_no_shadow_entry/chpasswd.test index 82837974..d97d8b56 100755 --- a/tests/usertools/chpasswd/04_chpasswd_no_shadow_entry/chpasswd.test +++ b/tests/usertools/chpasswd/04_chpasswd_no_shadow_entry/chpasswd.test @@ -8,6 +8,9 @@ cd $(dirname $0) . ../../../common/log.sh log_start "$0" "chpasswd changes the passwd entry if there are no shadow entries" +# FIXME: The PAM and !PAM versions differs: +# PAM will create a shadow entry if the shadow file exists +# !PAM will update the passwd entry and leave the shadow file untouched save_config