Unix & Linux Asked by SidJo on December 15, 2021
I want to run "./dothis.sh" if someone executes "cat abc.txt"
Is there some way to do this without using alias?
I want to use this for strengthening security of some specific files on a server.
Thanks for any help you can provide.
Actually, what i want is: I have a passwords file (encrypted of course) which is accessible to the root user. I want to prepare for a "break-in", per say, where the root user is compromised. So, if someone, using the root user tries to view that file with vim or cat, i want them to be locked in an infinite loop, so that they have to exit the terminal on their end. I dont want the keyboard interuption to work. But, if i use the whole path of the utility Eg."/usr/bin/cat" Then it should work. Basically... I want to create an alias where "cat " runs a custom script. I require the script as well as how to properly alias it. Thanks
Answered by SidJo on December 15, 2021
man auditd
man auditd.conf
Is what you're looking for and then you run a command once there's a line being logged:
Answered by Artem S. Tashkinov on December 15, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP