Description
Describe the bug
Initializing tedge
manually via tedge --init
fails due to the following reason:
User not found: "mosquitto".
However the user does exist as trying to create it manually produces the following error message from useradd
:
useradd mosquitto
useradd: user 'mosquitto' already exists
The user can also be verified to exist by checking the id <username>
command:
id mosquitto
uid=979(mosquitto) gid=979(mosquitto) groups=979(mosquitto)
To Reproduce
-
Setup a device running Fedora IoT 38
-
Install
mosquitto
(and then reboot as the packages will only be available after a reboot due to the way rpm-ostree works)rpm-ostree install mosquitto --reboot
-
Download the tarball for the relavant cpu (in this case it was for aarch64)
curl -L https://github.com/thin-edge/thin-edge.io/releases/download/0.11.0/tedge_0.11.0_aarch64-unknown-linux-musl.tar.gz -O
-
Expand downloaded tarball (extracting the thin-edge.io binaries)
tar xvzf tedge_0.11.0_aarch64-unknown-linux-musl.tar.gz
-
Create the tedge user
useradd tedge
-
Try to initialize tedge (running as root) (assuming you are in the folder where you downloaded and extracted the thin-edge.io tarball)
./tedge --init
Expected behavior
The tedge --init
command should initialize successfully without an error (when the mosquitto package and user is installed).
Screenshots
The following is the log showing the error message when running the command as root.
[root@lumber ~]# ./tedge --version
tedge 0.11.0
[root@lumber ~]# ./tedge --init
Error: Failed to initialize tedge. You have to run tedge with sudo.
Caused by:
User not found: "mosquitto".
[root@lumber ~]# id mosquitto
uid=979(mosquitto) gid=979(mosquitto) groups=979(mosquitto)
[root@lumber ~]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
jack:x:1000:1000::/var/home/jack:/bin/bash
tedge:x:1001:1001::/var/home/tedge:/bin/bash
Environment (please complete the following information):
- OS [incl. version]: Fedora Linux 38.20230419.2 (IoT Edition)
- Hardware [incl. revision]: Raspberry Pi 4
- System-Architecture [e.g. result of "uname -a"]: Linux lumber 6.2.9-300.fc38.aarch64 1 SMP PREEMPT_DYNAMIC Thu Mar 30 22:53:50 UTC 2023 aarch64 GNU/Linux
- thin-edge.io version [e.g. 0.1.0]: 0.11.0
Additional context