Time Quotas - How to set ?

Greetings,

I have set a Linux server to allow windows users on our network to log in and access the internet.

I am using RH9 and samba 3.0 set to work as PDC so users are logging into the domain.

To avoid that some users will hog the computers all the time keeping the others from using them, I want to set time quotas.

Say like some users will have 10 hours per week and some will have like 1 hour per day.

Is this doable in Linux ?

Do I need any aditional software ?
wildcat2000Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

de2ZotjesCommented:
I haven't tested it, but there is plugin for pam: time

If you are using unix accounts for your authentication you could add the time plugin to the system_auth configuration of pam.

This would probably do what you are looking for
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pjedmondCommented:
The shadow password suite restricts the max amount of time that someone can be logged in at any time (logoutd):

http://www.die.net/doc/linux/LFS/appendixa/shadow.html

This is similar to the free dial up ISP accounts that automatically log you out after you have been connected for an hour, and then you are forced to re-dialin. You would need to tweak this a little in order to get the flexibility that you require.

pam_time  as far as I am aware enables you to restrict logins to certain times of the day based on the location that they are logging in for, so again does not exactly fit your requirements either:( There is a fairly comprehensive list of pam modules available here that it may be possible to use in some fashion for what you require:

http://www.kernel.org/pub/linux/libs/pam/modules.html

My general impression of what you have is that you will need to alter the logging proces/authentication process for samba to detail login times, and then the next problem is how do you decide when they are actually logged out? Overall, this approach to trying to restrict users doesn't appear to be particularly workable, hence there not being a readily available solution for it.

Perhaps a better to prevent any 1 user 'hogging' the processor is to monitor the output of 'top' and if CPU usage gets near to a threshold, then start to throttle the processes of the heaviest users using 'nice'?


0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.