Score:2

Skeleton files /etc/skel/ automatic syncing of changes to all users

us flag

Linux distributions place some important scripts and config files in the skeleton, from where they are copied to each new user's home directory. Ideally system-wide files would be used instead of anything automatically copied to home but this is not always possible or practical. In particular, shell startup scripts are nearly always placed in skel.

This poses problems when packages are upgraded and any changes that need to be done to those scripts are installed in /etc/skel/ but all existing users retain the old versions in their homes, and often the old version causes serious problems with the changed system software.

Those changes would need to be synced to all existing users in an automated fashion. We don't want to overwrite user's own changes, so a simple cp or rsync won't suffice, and ideally we would have auto merging when possible.

My question is, is there any existing clever solution to such syncing? I can write my own Python script but it would be nice if someone else had already sorted out the problems that might occur.

There is a related question regarding a specific setup, with no solution for general purpose syncing: Adding/updating skeleton files after user creation

Score:4
in flag

I know this probably feels like a non-answer, but my answer is to avoid doing that if at all possible.

The stuff under skel really should only be per-user things, and shouldn't need to be managed after they have been deployed.

If you have shell fragments and config put them in the /etc/profile, /etc/profile.d.

Drop any system wide scripts under /usr/local/bin.

System wide configuration should go under the appropriate file in /etc. Or if the app doesn't support a system wide configuration , maybe add a config file under /etc and deploy a symlink to the /etc config file via the skel.

Tronic avatar
us flag
I concur absolutely. Unfortunately the distributions didn't get that memo, so they configure things like shell completions via skel and then break those in upgrades.
Score:0
kr flag

You should be using centralized management systems like ansible (or any other system you prefer) to distribute scripts instead of relying on standalone methods like /etc/skel. Just my two cents.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.