Skip to content

Commit cd554d6

Browse files
loolgagath
authored andcommitted
feat!: Change default user and hostname to qcom
For consistency in docs and CI, use qcom as default user, password, and hostname, no matter the distro. Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com> Signed-off-by: Agathe Porte <agathe.porte@oss.qualcomm.com>
1 parent 63c8215 commit cd554d6

5 files changed

Lines changed: 29 additions & 27 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ NB: It's also possible to run qdl from the host while the board is not connected
199199
200200
#### Login
201201
202-
Once the image has booted, you can log in as the `debian` user, with the
203-
default `debian` password. The image should then ask you to change this default
202+
Once the image has booted, you can log in as the `qcom` user, with the
203+
default `qcom` password. The image should then ask you to change this default
204204
password to a safe one.
205205
206206
## Development

ci/lava/qcs6490-rb3gen2-vision-kit/boot.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ actions:
3333
- boot:
3434
auto_login:
3535
login_prompt: 'login:'
36-
username: debian
36+
username: qcom
3737
password_prompt: 'Password'
38-
password: debian
38+
password: qcom
3939
login_commands:
40-
- "debian"
40+
- "qcom"
4141
- "new password"
4242
- "new password"
4343
- sudo su
4444
method: minimal
4545
prompts:
46-
- root@debian
47-
- debian@debian
46+
- root@qcom
47+
- qcom@qcom
4848
- "Current password"
4949
- "New password"
5050
- "Retype new password"

ci/lava/qrb2210-rb1/boot.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ actions:
3434
- boot:
3535
auto_login:
3636
login_prompt: 'login:'
37-
username: debian
37+
username: qcom
3838
password_prompt: 'Password'
39-
password: debian
39+
password: qcom
4040
login_commands:
41-
- "debian"
41+
- "qcom"
4242
- "new password"
4343
- "new password"
4444
- sudo su
4545
method: minimal
4646
prompts:
47-
- root@debian
48-
- debian@debian
47+
- root@qcom
48+
- qcom@qcom
4949
- "Current password"
5050
- "New password"
5151
- "Retype new password"

ci/qemu_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,19 @@ def test_password_reset_required(vm):
6969
# https://github.com/qualcomm-linux/qcom-deb-images/issues/69
7070

7171
# This takes a minute or two on a ThinkPad T14s Gen 6 Snapdragon
72-
vm.expect_exact("debian login:", timeout=240)
72+
vm.expect_exact("qcom login:", timeout=240)
7373

74-
vm.send("debian\r\n")
74+
vm.send("qcom\r\n")
7575
vm.expect_exact("Password:")
76-
vm.send("debian\r\n")
76+
vm.send("qcom\r\n")
7777
vm.expect_exact("You are required to change your password immediately")
7878
vm.expect_exact("Current password:")
79-
vm.send("debian\r\n")
79+
vm.send("qcom\r\n")
8080
vm.expect_exact("New password:")
8181
vm.send("new password\r\n")
8282
vm.expect_exact("Retype new password:")
8383
vm.send("new password\r\n")
84-
vm.expect_exact("debian@debian:~$")
84+
vm.expect_exact("qcom@qcom:~$")
8585

8686
# The /boot/efi/loader/random-seed file should not be readable to users
8787
# https://github.com/qualcomm-linux/qcom-deb-images/issues/279

debos-recipes/qualcomm-linux-debian-rootfs.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
{{- $kernelpackage := or .kernelpackage "linux-image-arm64" }}
55
{{- $overlays := or .overlays "qsc-deb-releases" }}
66
{{- $buildid := or .buildid "" }}
7+
{{- $username := or .username "qcom" }}
8+
{{- $hostname := or .hostname "qcom" }}
79

810
{{- $variantid := "console" }}
911
{{- if eq $xfcedesktop "true" }}
@@ -121,16 +123,16 @@ actions:
121123
- wpasupplicant
122124

123125
- action: run
124-
description: Set hostname to "debian"
126+
description: Set hostname to "{{ $hostname }}"
125127
chroot: true
126128
command: |
127129
set -eux
128-
echo debian >/etc/hostname
130+
echo {{ $hostname }} >/etc/hostname
129131
# /etc/hosts is created by netbase
130-
sed -i "1s/^/127.0.1.1 debian\n/" /etc/hosts
132+
sed -i "1s/^/127.0.1.1\t{{ $hostname }}\n/" /etc/hosts
131133
132134
- action: run
133-
description: Add a "debian" user, add it to sudoers and various groups
135+
description: Add a "{{ $username }}" user, add it to sudoers and various groups
134136
chroot: true
135137
command: |
136138
set -eux
@@ -140,17 +142,17 @@ actions:
140142
# from the serial console, over SSH, or in containers - where the desktop
141143
# session has not updated ACLs to the device nodes
142144
useradd --create-home --shell /bin/bash --user-group \
143-
--groups adm,audio,fastrpc,render,sudo,users,video debian
144-
# set password to "debian"
145-
echo debian:debian | chpasswd
145+
--groups adm,audio,fastrpc,render,sudo,users,video {{ $username }}
146+
# set password to "{{ $username }}"
147+
echo {{ $username }}:{{ $username }} | chpasswd
146148
# password must be changed on first login
147-
chage --lastday 0 debian
149+
chage --lastday 0 {{ $username }}
148150
# add to sudoers
149151
mkdir -v --mode 755 --parents /etc/sudoers.d
150152
# subshell to override umask
151153
(
152154
umask 226
153-
echo "debian ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/90-debos
155+
echo "{{ $username }} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/90-debos
154156
)
155157
156158
# NB: Recommends pull in way too many packages, and we don't need to follow
@@ -206,7 +208,7 @@ actions:
206208
chroot: true
207209
command: |
208210
set -eux
209-
usermod -a -G docker debian
211+
usermod -a -G docker {{ $username }}
210212
211213
{{- if eq $xfcedesktop "true" }}
212214
# this should ideally be task-xfce-desktop, but this pulls too many apps;

0 commit comments

Comments
 (0)