You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
After some further investigation, it seems the uzers library is unable to lookup the user id and group id, in an rpm-ostree environment.
Using the id command directly do not have such asn issue, e.g.id -u <user> and id -g <group> are able to lookup the ids successfully.
The following shows the file where the user/group lookups are being called from:
file: crates/common/tedge_utils/src/file.rs
use uzers::get_group_by_name;
use uzers::get_user_by_name;
It must be noted that the rpm-ostree handles users under /usr/lib/passwd and groups under /usr/lib/group (instead of /etc/passwd and /etc/groups), so this is most likely the cause problems with the current library.
Though it seems there is a lot of ongoing work regarding the management of users/groups in rpm-ostree (currently it uses nss-altfiles), so it might be best to hold off further effort here:
Describe the bug
Initializing
tedge
manually viatedge --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: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)Download the tarball for the relavant cpu (in this case it was for aarch64)
Expand downloaded tarball (extracting the thin-edge.io binaries)
Create the tedge user
Try to initialize tedge (running as root) (assuming you are in the folder where you downloaded and extracted the thin-edge.io tarball)
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.
Environment (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: