File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,12 @@ mkdir "$SCRATCH_DIR"
11
11
cd $SCRATCH_DIR
12
12
13
13
14
- mkdir bin dev proc sys etc root usr var
14
+ mkdir bin dev proc sys etc root usr var home
15
15
mkdir -p usr/bin/libexec # (sshd-session by (default?) compiles into /usr/bin/libexec
16
16
mkdir -p etc/ssh
17
17
mkdir -p var/run # (otherwise sshd cannot write its pid file)
18
+ mkdir -p home/standard-user
18
19
19
- # Crate users/groups
20
-
21
- echo ' root:x:0:' > ./etc/group
22
20
23
21
# Copy over busybox
24
22
cp " $BUILD_ARTIFACTS_FOLDER " /busybox/busybox ./bin
45
43
cd - && cd ../
46
44
echo $PWD
47
45
46
+ # Crate users/groups
47
+
48
48
# Layout minimal user accounts
49
49
echo ' root:x:0:0:root:/root:/bin/sh' > ./etc/passwd
50
+
51
+ echo ' standard-user:x:1000:1000:standard-user:/home/standard-user:/bin/sh' >> ./etc/passwd
52
+
50
53
# Without sshd user, you get 'Privilege separation user sshd does not exist'
51
54
echo ' sshd:x:128:65534::/run/sshd:/usr/sbin/nologin' >> ./etc/passwd
52
55
53
56
echo ' root:*:19216:0:99999:7:::' > ./etc/shadow
54
-
55
57
echo ' echo ' root:x:0:' > ./etc/groups'
58
+
59
+ echo ' Creating standard-user with default password password'
60
+ echo ' standard-user:zyEbcafGgBcEw:20080:1000:99999:7:::' >> ./etc/shadow
61
+ echo ' echo ' standard-user:x:1000:' > ./etc/groups'
62
+
56
63
mkdir var/empty # TODO Missing privilege separation directory: /var/empty (sshd wants it)
57
64
# NOTE ownership of /var/empty is altered during init
58
65
You can’t perform that action at this time.
0 commit comments