linuxprosun wrote:

No, as far I know, cron don't bother about the login done or not, and I want to logout the person just after the 1hr, after (s)he logs in, not on around the clock basis. I used cron and found that if user logs in last minute of the cron schedule, then (s)he logs out just after 1min, from his/her log on. Thanks for your reply, please give me more suggestions.

waiting
prosun


This is not the right way to do it. If you want to use cron, here is what you _may_ do:

1. Have a program that will run at intervals of 1 or two minutes, do a "ps -A u" and look for new logins and note their process-ids and the current time.

2. On each subsequent run, compare the time left for each of these users; kill those login processes whose time has expired. Also, as in step 1, look for new logins.

- 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