Forum Discussion
Execute a shell script prior to full login
You should be able do this the same way you would do on a Linux machine - add your script as a .sh file on /etc/profile.d/ folder.
For example I created this bash script : myscript.sh in folder /etc/profile.d/ and made it executable using
chmod +x /etc/profile.d/myscript.sh
myscript.sh has contents:
echo "Last Failed login attempt:"
aureport --login --failed|grep ${USER}|tail -1
now when users ssh to the box they will see their last failed login attempt
Obviously you can use any other valid commands in your bash script and name it differently. Note that since you are modifying the base operating system config this will not be supported by F5 and can be potentially overwritten during the upgrades.
Hope this helps,
Sam
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
