This file is indexed.

/usr/share/tcos/hooks-addons/00users is in initramfs-tools-tcos 0.89.93ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Hook addon for user password stuff

cpifexists /etc/login.defs    /etc
cpifexists /usr/sbin/tcospasswd /usr/sbin

# the root password by default is "root"
root_shadow="root:$(/usr/sbin/tcospasswd root):13562:0:99999:7:::"

if [ "${TCOS_ROOT_PASSWD}" != "" ]; then
   # generate shadow hash
   root_shadow="root:$(/usr/sbin/tcospasswd ${TCOS_ROOT_PASSWD}):13562:0:99999:7:::"
fi


# create /etc/tcospasswd if exists tcosmonitor secret passwd
if [ -e /etc/tcos/secrets/tcosmonitor-secret ]; then
   secret1="$(cat /etc/tcos/secrets/tcosmonitor-secret | awk -F":" '{print $1}')"
   secret2="$(cat /etc/tcos/secrets/tcosmonitor-secret | awk -F":" '{print $2}')"
   secret2_passwd="$(/usr/sbin/tcospasswd $secret2)"
   echo "$secret1:$secret2_passwd" > $DESTDIR/etc/tcospasswd
   root_shadow="root:${secret2_passwd}:13562:0:99999:7:::"
fi


# create /etc/passwd /etc/shadow and /etc/group

cat << EOF >> $DESTDIR/etc/passwd
root:x:0:0:root:/root:/bin/sh
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
sshd:x:105:65534::/var/run/sshd:/bin/false
EOF

# default password for root user is "root"
cat << EOF >> $DESTDIR/etc/shadow
${root_shadow}
daemon:*:13250:0:99999:7:::
bin:*:13250:0:99999:7:::
sys:*:13250:0:99999:7:::
lp:*:13250:0:99999:7:::
nobody:*:13250:0:99999:7:::
sshd:!:13250:0:99999:7:::
EOF

cat << EOF >> $DESTDIR/etc/group
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
lp:x:7:
kmem:x:15:
audio:x:29:pulse
users:x:100:
ssh:x:109:
EOF