Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: Local UI does not start after software update
#16
(03-01-2024, 05:03 AM)NHWally Wrote: Tim,
If your intent is to run the UI as 'root', then it is not masking any config problem to just find out who is root.
It should not matter how many users are configured... Uid 1000 is root.

Isn't looking in /home to find the root user just a workaround?
Indeed, the passwd entry also explicitly contains the path to root's home directory if you need it.

The problem that I encountered is a direct side-effect of the implementation, not a problem with the design. The code is simply finding the root user and I don't think that enforcing only one user, or that only one directory is located in /home was ever the intent of the code, just an unintended side effect.

Judging by my brief look at the code, I can tell that you are trying (and succeeding!) in doing a top-notch job with this code. It is well laid out and legible.

I really appreciate what you do, and want to say thanks!
I use my Moode constantly, and would be lost without it.

-W

As @TheOldPresbyope mentioned the user "root" does not exist in MoodeOS. The only user that should exist is the one created via prepping the image with Raspberry Pi Imager.

Since this image prep is REQUIRED per the Setup Guide it's perfectly safe to assume that there will only be one user sub-directory under /home.

The Pi Imager prep requirement was introduced almost a year ago (March 2023) starting with version 8.3.0 to provide improved security for the release images. Obviously there will be many users that don't go for a fresh image and instead perform an in-place update. If there is already more than one userid sub-dir in /home then there is the potential for breakage due to the assumption in the code that will only be one sub-dir.

The best way to handle this situation as I suggested earlier would be to add some code to notify the user since they are the only one that can know which id(s) to delete but I'm not sure thats even necessary at this point because we get virtually no reports of this issue anymore.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
RE: Local UI does not start after software update - by Tim Curtis - 03-01-2024, 11:49 AM

Forum Jump: