* The PAM version now allows chpasswd an user when there are no shadow entries
(or maybe PAM behavior changed). * Document the differences between the 2 versions (PAM will add a shadow entry and the !PAM version will just update the passwd entry). This may have to be fixed later, but is not a clear bug. * Remove unnecessary files
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
chpasswd: (user lp) pam_chauthtok() failed, error:
|
||||
Authentication token manipulation error
|
||||
chpasswd: (line 2, user lp) password not changed
|
||||
@@ -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
|
||||
@@ -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@::::::
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user