Solved

Time Quotas - How to set ?

Posted on 2004-08-01
4
225 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

839 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