Hi, I am attaching a debdiff patch that simply imports the upstream fix for this regression.
This has been successfully run-tested on stretch amd64. Thanks, Baptiste PS: it seems that the source git repo [1] is not longer up-to-date because of a recent NMU change. Thus, the attached patch is against the source package instead of the git repo. [1] https://anonscm.debian.org/git/pkg-shadow/shadow.git On 21-07-17, Baptiste Jonglez wrote: > Is there any chance to get this bug fixed in stretch? > > It's quite annoying when deploying Unix users with ansible, because the > ansible module relies on useradd. As a result of this bug, new users have > no defined shell. > > The upstream patch "Fix regression in useradd not loading defaults > properly" is available here: > > > https://github.com/shadow-maint/shadow/commit/507f96cdeb54079fb636c7ce21e371f7a16a520e.patch > > Thanks, > Baptiste
diff -Nru shadow-4.4/debian/changelog shadow-4.4/debian/changelog --- shadow-4.4/debian/changelog 2017-05-17 13:59:59.000000000 +0200 +++ shadow-4.4/debian/changelog 2017-08-31 10:47:16.000000000 +0200 @@ -1,3 +1,11 @@ +shadow (1:4.4-4.2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix shell not being set by useradd. + This is a regression in 4.4 already fixed upstream. (Closes: #865762) + + -- Baptiste Jonglez <deb...@bitsofnetworks.org> Thu, 31 Aug 2017 10:47:16 +0200 + shadow (1:4.4-4.1) unstable; urgency=high * Non-maintainer upload. diff -Nru shadow-4.4/debian/patches/0009-Fix-regression-in-useradd-not-loading-defaults.patch shadow-4.4/debian/patches/0009-Fix-regression-in-useradd-not-loading-defaults.patch --- shadow-4.4/debian/patches/0009-Fix-regression-in-useradd-not-loading-defaults.patch 1970-01-01 01:00:00.000000000 +0100 +++ shadow-4.4/debian/patches/0009-Fix-regression-in-useradd-not-loading-defaults.patch 2017-08-31 10:47:16.000000000 +0200 @@ -0,0 +1,37 @@ +From 507f96cdeb54079fb636c7ce21e371f7a16a520e Mon Sep 17 00:00:00 2001 +From: Tomas Mraz <tm...@fedoraproject.org> +Date: Thu, 25 Aug 2016 11:20:34 +0200 +Subject: [PATCH] Fix regression in useradd not loading defaults properly. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The get_defaults() has to be called before processing the flags. + +Signed-off-by: Tomáš Mráz <tm...@fedoraproject.org> +--- + src/useradd.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/useradd.c b/src/useradd.c +index fefa234c..6c43e7e3 100644 +--- a/src/useradd.c ++++ b/src/useradd.c +@@ -2027,6 +2027,8 @@ int main (int argc, char **argv) + is_shadow_grp = sgr_file_present (); + #endif + ++ get_defaults (); ++ + process_flags (argc, argv); + + #ifdef ENABLE_SUBIDS +@@ -2036,8 +2038,6 @@ int main (int argc, char **argv) + (!user_id || (user_id <= uid_max && user_id >= uid_min)); + #endif /* ENABLE_SUBIDS */ + +- get_defaults (); +- + #ifdef ACCT_TOOLS_SETUID + #ifdef USE_PAM + { diff -Nru shadow-4.4/debian/patches/series shadow-4.4/debian/patches/series --- shadow-4.4/debian/patches/series 2017-05-17 13:59:59.000000000 +0200 +++ shadow-4.4/debian/patches/series 2017-08-31 10:47:16.000000000 +0200 @@ -28,3 +28,4 @@ 501_commonio_group_shadow # does not apply cleanly, please merge at upstream 1010_vietnamese_translation +0009-Fix-regression-in-useradd-not-loading-defaults.patch
signature.asc
Description: PGP signature