Adding a new user with no home and no password incorrectly sets the shell to in/nologin
The adduser program is used to create new users. A particular combination of arguments results in an invalid entry in /etc/passwd
adduser hello -D -H
results in the following entry in /etc/passwd
hello:x:1001:1001:Linux User,,,:/home/hello:in/nologin
Note that the shell indicates
in/nologin
This was reproduces on Apline 3.7. I determined the version of Alpine as follows:
- I am using resin/beaglebone-black-alpine:3.7 (see https://hub.docker.com/r/resin/beaglebone-black-alpine/)
- That container has a FROM of container arm32v6/alpine:3.7
- That container downloads from https://github.com/gliderlabs/docker-alpine/blob/a12961cc31718486b276f352b875169885f53e4c/versions/library-3.7/armhf/options
- Finally, that has a PULL URL of https://github.com/gliderlabs/docker-alpine/blob/a12961cc31718486b276f352b875169885f53e4c/versions/library-3.7/armhf/options (where version=3.7.0)
This may not be an Alpine specific, but it seems hard to imagine that I cannot find any other reports, so my guess is that this is somehow specific to Alpine. I’m happy to file elsewhere if I’m incorrect.
(from redmine: issue id 8773, created on 2018-04-06)