Solved

Time Quotas - How to set ?

Posted on 2004-08-01
4
222 Views
Last Modified: 2013-12-15
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 ?
0
Comment
Question by:wildcat2000
4 Comments
 
LVL 6

Accepted Solution

by:
de2Zotjes earned 63 total points
ID: 11697080
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
 
LVL 22

Assisted Solution

by:pjedmond
pjedmond earned 62 total points
ID: 11757312
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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now