[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: correct (PAM) syntax for per-user "no limit" on a resource



On Mon, Apr 10, 2000 at 07:44:09PM +0000, Jim Breton wrote:
> What is the correct way to give unlimited usage of a particular resource
> for a specific user?
> 
> I want my own account to have a couple of exemptions from the default
> resource limits, and one of them should be unlimited CPU time.

I also tried to do this, and AFAICT it is not possible, the
documentation does not give any hints as to something that would work
and everything i tried failed.  it seems you either excempt the user
from limits entirely (which you don't want) or your stuck with just
setting an absurdly large limit for the `exemptions' 

> How should I do this?  I have tried:
> 
> jimb          -       cpu             unlimited
> 
> and
> 
> jimb          -       cpu             0
> 
> 
> The "unlimited" attempt gives me an error in syslog:
> 
> Apr 10 15:41:02 tarkin pam_limits[10646]: wrong limit value 'unlimited'
> 
> and ends up giving me the default limit.
> 
> Otoh, using "0" sets my cpu time limit to literally 0, but I'm not
> confident that this is a "good thing."  Is 0 understood to be no limit,
> or to be literal 0 which will cause something to break at some point?

yup, your processes will be killed as soon as they do anything.  cpu
limits are measured in seconds, when your process spends more then x
seconds doing something its killed.  to see this demonstrated set your
limit to say 10 seconds then run John or a Distributed net client,
after 10 seconds its killed.

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgps8UWjcbtim.pgp
Description: PGP signature


Reply to: