Background
RedHat 7 (and 6) servers with multiple application servers (shared binaries).
We set up separate user accounts when adding applications servers with $HOME = appserver_root. The installation however demands that the target directory does not exist.
So we:
- Create the user without creating the home directory
- Install the server into (and creating) the home directory
- Reset the permissions of the home directory
This process will not set up the skeleton files, i.e. copy /etc/skel/
Question
We can simply copy /etc/skel/.*, but is there a tooled way - command - which will do this?
I'd prefer using a standard tool instead of making a guess, or parsing /etc/default/useradd for the correct SKEL path.
You could try to adjust your procedure to something like this:
username.skeleton
for exampleusername.skeleton
dir (there can be conflicts if the server installation creates its own config files), or simply copy over the files already merged in previous identical installations, if available.I'm using a similar procedure for my own homedir when installing a new OS version because my existing config files from the older OS version may negatively impact the newer app versions and the new skeleton files are missing my customisations - they need to be merged.