something that i can put block of hours into and thats all the users can use
Main Topics
Browse All TopicsHi There
I need to get hold of a program or script that will allow a user a set amount of time
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
If you need to set the same hours for all users, you can place a SCHED=... option to the appropriate /etc/default/getty.somethi
Another option would be to have getty run a different program than the default /bin/login - perhaps a script, that would find the user name in a list of allowed hours, compare that to the current time and either call the original /bin/login or die.
Anyway, I'm sure somebody has already written such a script, but I didn't come across it yet.
The only way I can think to do it would be to write a script run by a cron job that parses the output of 'who' (which shows you who is logged in, and what time they logged in), checked for the users you wanted to limit, figured out if they were over limit, then kicked them off. I've done something similar for dialin users who were using remote file mounts, but it wouldn't work for this project. Such software must exist, however. You might find something that would do this for you as a utility inside some BBS or ISP software for Linux. Check on www.freshmeat.net or www.google.com.
I think we are on a good track here. Probably we'd use two components:
1. a script invoked via the getty/login mechanism that would allow the user to log-on only during the specified hours.
2. a cron-invoked script that would kick off any users who have exceeded their hours.
As kiffney suggested, I'd also recommend searching www.freshmeat.net, www.redhat.com, etc. As the last resort we can try to write this; however, I dislike re-inventing the wheel.
There is actually a powerful package available to do just what you are looking for. It's called clobberd and it works very well. You can find it on the RedHat Powertools CD or
you can do a search for it at http://www.tuxfinder.com/
Once you have installed it start the daemon by running "clobberd". Then run "clobberd localhost" to edit users, restrictions etc. BTW, the default password is honda.
Have fun.
Business Accounts
Answer for Membership
by: joe_hPosted on 2000-03-03 at 07:02:51ID: 2580337
what exactly do you mean? Something that logs the user out if he/she has been logged in for too long?