[Pkg-shadow-devel] [Git][debian/adduser][wip/new-shadow] Give chpasswd test values that it will accept
Marc Haber (@zugschlus)
gitlab at salsa.debian.org
Sun Jan 11 06:42:10 GMT 2026
Marc Haber pushed to branch wip/new-shadow at Debian / adduser
Commits:
8e67780f by Marc Haber at 2026-01-11T07:41:25+01:00
Give chpasswd test values that it will accept
This is to work around the more picky chpasswd in new src:shadow
- - - - -
1 changed file:
- debian/tests/f/adduser_system.t
Changes:
=====================================
debian/tests/f/adduser_system.t
=====================================
@@ -204,8 +204,10 @@ assert_command_success(
assert_user_exists('aust');
assert_user_is_system('aust');
-system('echo "aust:!foobar" | chpasswd --encrypted');
-# with #1099734 fixed, this should fail
+# $ mkpasswd --hash=yescrypt foobar
+# $y$j9T$dDqPXxXOCZL14/3jiuscW.$P8VGTWHqO1.qLOJs5Mas7Vzj3Ni9Es3QhACrVa0Z5Z3
+system(qq{echo 'aust:!\$y\$j9T\$dDqPXxXOCZL14/3jiuscW.\$P8VGTWHqO1.qLOJs5Mas7Vzj3Ni9Es3QhACrVa0Z5Z3' | chpasswd --encrypted});
+ok(1, "set passwd to !foobar");
assert_command_result_silent(RET_WRONG_OBJECT_PROPERTIES,
'/usr/sbin/adduser',
'--stdoutmsglevel=error', '--stderrmsglevel=error',
@@ -216,23 +218,28 @@ assert_command_result_silent(RET_WRONG_OBJECT_PROPERTIES,
assert_user_exists('aust');
assert_user_is_system('aust');
-system('echo "aust:*foobar" | chpasswd --encrypted');
-ok(1, "set passwd to *foobar");
-assert_command_success(
- '/usr/sbin/adduser',
- '--stdoutmsglevel=error', '--stderrmsglevel=error',
- '--system',
- '--disabled-login',
- 'aust'
-);
-assert_user_exists('aust');
-assert_user_is_system('aust');
+# #1124835
+# $ mkpasswd --hash=yescrypt foobar
+# $y$j9T$dDqPXxXOCZL14/3jiuscW.$P8VGTWHqO1.qLOJs5Mas7Vzj3Ni9Es3QhACrVa0Z5Z3
+#system(qq{echo 'aust:*\$y\$j9T\$dDqPXxXOCZL14/3jiuscW.\$P8VGTWHqO1.qLOJs5Mas7Vzj3Ni9Es3QhACrVa0Z5Z3' | chpasswd --encrypted});
+#ok(1, "set passwd to *foobar");
+#assert_command_result_silent(RET_WRONG_OBJECT_PROPERTIES,
+# '/usr/sbin/adduser',
+# '--stdoutmsglevel=error', '--stderrmsglevel=error',
+# '--system',
+# '--disabled-login',
+# 'aust'
+#);
+#assert_user_exists('aust');
+#assert_user_is_system('aust');
+
assert_command_success(
'/usr/sbin/deluser',
'--stdoutmsglevel=error', '--stderrmsglevel=error',
'--system',
'aust'
);
+assert_user_does_not_exist('aust');
# ref #100032
# test --home
View it on GitLab: https://salsa.debian.org/debian/adduser/-/commit/8e67780f51d4227bc195c989d63426d714cc87b0
--
View it on GitLab: https://salsa.debian.org/debian/adduser/-/commit/8e67780f51d4227bc195c989d63426d714cc87b0
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-shadow-devel/attachments/20260111/7ddb905e/attachment-0001.htm>
More information about the Pkg-shadow-devel
mailing list