The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Thank you for your donation!


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


moodeutl -i removes home directories
#1
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.
Reply


Messages In This Thread
moodeutl -i removes home directories - by redlegoman - 04-09-2025, 09:46 AM

Forum Jump: