Abhijit Banerjee wrote:

prosun try this
in bashrc add at the end

sleep 3600
logout


Won't work, unfortunately! All this will do is block the terminal for one hour and then log the user out. Not quite what Prosun desires.

Also, any modifications made to the user's .bashrc or .bash_profile can be undone by the user any time in the one hour available to him. So, the modifications should be made to the system-wide /etc/profile file. This file, along with the user's own .bash_profile and .bashrc are read in during every login.

Here's an outline of what _probably_ has to be added in /etc/profile in order to achieve what Prosun desires:

1. The process-id of the user's login shell has to be obtained.
2. A shell script has to be started in the background and given this process-id. This background process will sleep for 1 hr (Abhijit's sleep 3600) and, on waking up, will kill the process whose process-id it knows.


Even then, clever users may be able to get around this.

Would others like to share their ideas too?

- Manas Laha


***************************************** This Mail is Certified to be Virus Free. CIC Network Security Group, IIT Kharagpur *****************************************

--
To unsubscribe, send mail to [EMAIL PROTECTED] with the body
"unsubscribe ilug-cal" and an empty subject line.
FAQ: http://www.ilug-cal.org/node.php?id=3

Reply via email to