adduser -D creates a locked account instead of a passwordless account

Ashen Gunaratne mail at ashenm.ml
Fri Nov 8 04:52:21 UTC 2019


The use of flag '-D' while user account creation 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:::

The aforesaid issue has been already submitted to the BusyBox Bug and 
Patch Tracking System bearing reference 10981.



More information about the busybox mailing list