'Configuring User Profiles automatically on login

I am trying to set up user profiles on a rhel 8 system for all users authenticated through a windows domain controller. I have set up the user accounts and configured the rhel 8 box as necessary for the user to login and display its credentials using sssd.conf. My issue begins with how to configure the user profiles without having to interact with the system every time.

The first of the two ways I would like to set up the user profiles is configuring gnome-tweaks. I would like to have the applications menu present and hold the classification banner at the top. I see how to modify these setting opening up gnome-tweaks on each user. I would like to somehow script and save these configurations so that when a new user logs in they all display the same menu items.

This brings me to my second issue. I created a script and added it to /etc/profile.d to copy files and create a folder so that my application menus looks the way I want after the gnome-tweaks changes. However, I'm running into an issue where the script only executes as root. So when root logs in, the script runs fine, the files get copies. When I log in as a different authenticated user, the script doesn't run. Could this have something to do with local vs domain accounts?

The file location I am coping to is the .local/share/applications folder and making a new folder in .config called menus and copying a file there as well. I created a script to do all of this, and I know it works when executed manually as a user, I need assistance on how to automate this executing for every new user.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source