How to run a script after user login authentication in linux
authentication, linux
Solution
For bash:
You can add your script to `/etc/profile.d` folder.
More reading about this here and here.
Basically, you should give your script the extension .sh as all these files are executed in a loop after user logs on.
Problem
I have a script which I want to run just after user log-in authentication. To accomplish this, I added the script name in `/etc/rc5.d/S##rc.local` file. But later i got to know that, anything that is added in rc.local file gets executed in boot time of the system not after the login authentication. Can anyone tell me how to run the script after user login authentication?