Bug 10981

Summary: adduser -D creates a locked account instead of a passwordless account
Product: Busybox Reporter: Ashen Gunaratne <mail>
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.28.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description Ashen Gunaratne 2018-04-30 07:46:16 UTC
The use of flag '-D' while creating an account seems to disable the created account (analogue of 'passwd -l') instead of simply leaving the account passwordless (analogue of 'passwd -u'). Which I find contrasting against the documentation;

>    -D              Do not assign a password

/ # busybox --help
BusyBox v1.28.3 (2018-04-03 20:29:50 UTC) multi-call binary

/ # addgroup -g 1000 alpine \
   && adduser -u 1000 -s /bin/sh -G alpine -D alpine

/ # cat /etc/shadow | grep alpine
alpine:!:17651:0:99999:7:::

/ # addgroup -g 1010 ubuntu \
   && adduser -u 1010 -s /bin/sh -G ubuntu ubuntu

/ # cat /etc/shadow | grep ubuntu
ubuntu:B8E3g/WNknCBw:17651:0:99999:7:::

Is this the expected behaviour of the executable?