"man useradd" says the following about the -s switch: The name of the user's login shell. The default is to leave this field blank, which causes the system to select the default login shell specified by the SHELL variable in /etc/default/useradd, or an empty string by default. Our /etc/default/useradd has a SHELL variable defined: # useradd -D | grep SHELL SHELL=/bin/bash But the useradd from shadow-4.4 (unlike the version from shadow-4.2.1) no longer respects that: # useradd -M testuser123 # getent passwd testuser123 testuser123:x:1005:1023::/home/testuser123:
commit 6d77df88eaeaf655fe420153b0a77d931bdefa31 Author: Lars Wendler <polynomial-c@gentoo.org> Date: Tue Dec 6 11:35:00 2016 sys-apps/shadow: Fixed loading of defaults (bug #601802). Package-Manager: portage-2.3.3 This has already been fixed in the github repository, so I revbumped shadow-4.4 and added the fix.