Bug 10981 - adduser -D creates a locked account instead of a passwordless account
Summary: adduser -D creates a locked account instead of a passwordless account
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.28.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-30 07:46 UTC by Ashen Gunaratne
Modified: 2018-04-30 07:46 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?