How to run script when SSSD creates home directory for a new user

gnomehomenautilusrhelsssd

I have a network with several RHEL6 workstations and RHEL IdM Server (a.k.a. FreeIPA) as a domain controller. Every LDAP user can log into the every workstation. When the user is logging in for the first time, SSSD creates $HOME/$USER directory for them.

I would like to set customized Gnome configuration for each user with this command:

nautilus-actions-new –label="Shred" –tooltip="Purge file" –icon="gtk-dialog-warning" –toolbar-label="Shred" –command="shred" –parameters="-f -u -v -z %f" -g

As I know, Gnome settings are stored locally in the homedir of each user and there is no possibility to set them globally for every user. So I wonder are there any hooks to SSSD's new homedir creating event in order to run the mentioned command?

Best Answer

Store the files in the skeleton directory. When a new user is created, the files in that directory should be copied to their home directory.

The directory is normally /etc/skel.

Related Question