Thank you for your donation!


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


moodeutl -i removes home directories
#8
(04-10-2025, 08:25 AM)redlegoman Wrote: But, I can also see that you are using the presence of /home/USER to work out which user is the one created by the raspberry pi imager. So, as you say, we can't really have extra users, not in /home anyway.
So I'll shut up.

Remember that the user and group names are just a convenience included for humans. What counts for almost all Linux system functions is the numeric UID and GID. If you use "ls -n" you'll see the actual UID:GID ownership of files and directories. 

In Debian, the non-system users and groups are assigned beginning at 1000 with 1000 typically being the "default" user. That's the UID to which the Imager program assigns whatever username it creates. If you change a username after the fact, the UID:GID of its files and directories will remain the same.

Some years ago, I toyed with reworking some of the moOde code to enforce the rule that UID:GID 1000:1000 would always be the default user in order to get around the problem of determining which user was which. This was because I'd also run into the problem of having created more than one user. In my case, I realized I was better off keeping moOde as a packaged single-user system and setting up a separate server(s) for some other services I was interested in. I stopped toying.

ISTM you could make your user "ansible" be some UID:GID other than 1000:1000 and modify moOde code mutatis mutandis (that's a clever Latin phrase roughly meaning "as is except for whatever changes are necessary") to get what you want.

Then post a git pull request Big Grin

Regards,
Kent
Reply


Messages In This Thread
RE: moodeutl -i removes home directories - by TheOldPresbyope - 04-10-2025, 04:04 PM

Forum Jump: