04-09-2025, 09:46 AM
(This post was last modified: 04-09-2025, 10:03 AM by redlegoman.
Edit Reason: typos
)
I've been trying to automate moodeaudio installs by using moodeutl -e to dump out a moodecfg.ini file and then using moodeutl -i to read it back in. However, when I do this, moodeutl -i removes some users home directories from /home. Is it supposed to do this?
Steps to reproduce on brand new install from raspberry pi imager (9.3.0)
I created a user called "moodeaudio" during pi imaging, rather than the "pi" user, but it is the same with the pi user
login as moodeaudio user
sudo useradd -m test
verify /home/test exists
sudo moodeutl -e /boot/moodecfg.ini
sudo moodeutl -i
see that /home/moodeaudio has gone but /home/test is still there!
In fact, during testing, I found it deletes all user's home dirs that come alphabetically before, well I'm not sure what.
After doing the above steps, I was left with only /home/test.
I then created a user called "test2", home dir - /home/test2 and after running moodeutl -i it deleted /home/test and left behind /home/test2
I should note that the users are still in /etc/passwd, just the home dirs in /home.
If I create a user with its home dir outside /home, it is not removed.
It seems to leave the /home dir of the user highest up the alphabet. I created a user called "zzzz" and it removed all the /home dirs except /home/zzzz.
Steps to reproduce on brand new install from raspberry pi imager (9.3.0)
I created a user called "moodeaudio" during pi imaging, rather than the "pi" user, but it is the same with the pi user
login as moodeaudio user
sudo useradd -m test
verify /home/test exists
sudo moodeutl -e /boot/moodecfg.ini
sudo moodeutl -i
see that /home/moodeaudio has gone but /home/test is still there!
In fact, during testing, I found it deletes all user's home dirs that come alphabetically before, well I'm not sure what.
After doing the above steps, I was left with only /home/test.
I then created a user called "test2", home dir - /home/test2 and after running moodeutl -i it deleted /home/test and left behind /home/test2
I should note that the users are still in /etc/passwd, just the home dirs in /home.
If I create a user with its home dir outside /home, it is not removed.
It seems to leave the /home dir of the user highest up the alphabet. I created a user called "zzzz" and it removed all the /home dirs except /home/zzzz.