Is there a Linux Shell Script that verifies user activity?
Unica
2011-02-13 20:18:41 UTC
Would like to find a sample of a script that will verify that no users are log in after hours. It will keep track of all user activity and report any unauthorized users.
Three answers:
anonymous
2011-02-13 20:36:39 UTC
You can edit /etc/security/time to limit the hours that users can log in, and use a crontab to kill all processes owned by those users. You can use the commands "who", "w", "last" or "ps" to verify that users are not logged in. You could even kill sshd to keep users from logging in, and have another sshd running on another port so administrators can log in if needed.
hinchey
2016-10-15 02:05:44 UTC
in case you want to hint consumer authentication, which would be accomplished incredibly actual by way of a cron activity on the LDAP server. i can factor you interior the wonderful direction fi you may desire to genuinely clarify your infrastructure somewhat, particularly what systems are used for what purposes. someway, i don't think of a shell script is the wonderful thank you to pass approximately this.
?
2011-02-13 20:25:20 UTC
post your question here for better help or do a search for it. http://ubuntuforums.org/ or to this one http://linuxforums.org/
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.