File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,22 @@ users and credentials as part of a derived build:
64
64
RUN useradd someuser
65
65
```
66
66
67
- However, it is important to understand some issues with the default
68
- ` shadow-utils ` implementation of ` useradd ` :
69
-
70
- First, typically user/group IDs are allocated dynamically, and this can result in "drift" (see below).
67
+ However, it is important to understand some two very important issues
68
+ with this as it exists today (the ` shadow-utils ` implementation of ` useradd ` )
69
+ and the default glibc ` files ` backend for the traditional ` /etc/passwd `
70
+ and ` /etc/shadow ` files.
71
+
72
+ It is common for user/group IDs are allocated dynamically, and this can result in "drift" (see below).
73
+
74
+ Further, if ` /etc/passwd ` is modified locally (because there is a machine-local user),
75
+ then any added users injected via ` useradd ` * will not appear* on subsequent updates by default (they will be
76
+ in ` /usr/etc/passwd ` instead - the default image version).
77
+
78
+ These "system users" that may be created by packaging tools invoking ` useradd ` (e.g. ` apt|dnf install httpd ` ) that do
79
+ not also install a ` sysusers.d ` file. Currently for example, this is the case with
80
+ the CentOS Stream 9 ` httpd ` package. Per below, the general solution to this
81
+ is to avoid invoking ` useradd ` in container builds, and prefer one of the below
82
+ solutions.
71
83
72
84
#### User and group home directories and ` /var `
73
85
You can’t perform that action at this time.
0 commit comments