1

How can I run a script immediately after login before /etc/motd is read?

I' m not looking to run the script from within /etc/profile.d or ~/.bashrc or ~/.profile

3
  • That should be possible via PAM. – Hauke Laging Aug 26 '17 at 16:04
  • @HaukeLaging coul you be more specific – user248252 Aug 26 '17 at 17:15
  • No; if I was familiar enough with PAM then I would have written an answer. – Hauke Laging Aug 26 '17 at 17:21
0

If login via ssh, check the ForceCommand option, see this question https://stackoverflow.com/q/33713680/1135424

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy