The option " --defaults " isn't not working; useradd --defaults useradd: option `--defaults' requires an argument But the -D is working. useradd -D GROUP=100 HOME=/home INACTIVE=-1 EXPIRE= SHELL=/bin/bash SKEL=/etc/skel CREATE_MAIL_SPOOL=no Usage: useradd [options] LOGIN Options: -D, --defaults print or save modified default useradd configuration I'm using the sys-apps/shadow-4.0.18.1-r1 (/usr/sbin/useradd) ( lastest )
Created attachment 129997 [details, diff] Patch to fix "--defaults" option to match "-D" option (make it have optional args). I have tested this. The struct incorrectly requires --defaults to have an argument, when clearly the app was designed to take -D or --defaults with optional args (if no arg, then display the defaults). This patch fixes that case to work correctly.
this has been fixed in latest code: {"defaults", no_argument, NULL, 'D'},