gliderlabs / gliderlabs/docker-alpine
adduser mangling /etc/passwd at new user shell
- Dominant language
- Shell
- Stars
- 5.7k
- Forks
- 530
- PR merge metrics
- No merged PRs in 30d
Description
Caught me off guard, this. Definitely a bug.
```
FROM gliderlabs/alpine:latest
Step 5 : ENV lxcuser "lxcmedia" lxcuid "1024" lxcgroup "users" lxcgid "100"
Step 15 : RUN adduser -h /home/$lxcuser -g "lxc-media user" -u $lxcuid -G $lxcgroup -D $lxcuser
```
This translates into the (triple-checked) command `adduser -h /home/lxcmedia -g "lxc-media user" -u 1024 -G 100 -D lxcmedia` which should create the user with the default shell. Instead, what it does to /etc/passwd is this:
```
nobody:x:65534:65534:nobody:/:/sbin/nologin
lxcmedia:x:1024:100:lxc-media user:/home/lxcmedia:obody
```
This is busybox 8586 - https://bugs.busybox.net/show_bug.cgi?id=8586 - should be fixed in 1.24.1. Confirmed no reproduction on 1.24.1 with buildroot, but alpine is reproducing reliably.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.