BASH logon scripts

Hello UCS community!

I am trying to create some policies for Linux/MacOS hosts. My approach is to implement this by writing shell scripts that will run on logon (or logout) and will do the necessary configurations (simple things, e.g. updating the system).

Although this feature seems to be created for Windows .BAT scripts, a post that I have found (Bash Script in Login Script in UCS) mentions that this is possible and the only restriction is the OS of the client that the script will run.

But when I am trying to push it, nothing happens. The steps that I have take are the following ones:

  1. Put the script in the server in the following path: /var/lib/samba/sysvol/<MY_DOMAIN_NAME>/scripts/<MY_SCRIPT>.sh

  2. Mark the script as executable by using “chmod +x”

  3. Create the “Desktop Policy” with the following configurations:

Desktop Language: EMPTY
Desktop Profile: EMPTY
Logon Scripts: <MY_SCRIPT>.sh
Logout Scripts: EMPTY

Save the policy

  1. Tie the policy to the testing host (by using various approaches). I have tried the following:
  • Tied the policy to all the users
  • Tied the policy to all the computers
  • Tied the policy only to the user that I am trying to log in with
  • Tied the policy only to the computer that I am trying to log in to

Nothing of the above (on Step 4) seems to be working, could you give me a helping hand? Is there something I am missing?

Thanks in advance!

Mastodon