Unix Technical Forum

/etc/limits

This is a discussion on /etc/limits within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> When you log in with ssh, the file /etc/limits is not read and applied like it is when you ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 01:57 PM
Dirk van Deun
 
Posts: n/a
Default /etc/limits

When you log in with ssh, the file /etc/limits is not read and applied
like it is when you log in on the console. I have found some very
old patches for openssh by slackware users (other distributions usually
do not use /etc/limits; they use PAM -> /etc/security/limits.conf),
but no recent ones for recent openssh versions. Does this mean
that slackers just aren't interested in usage limits anymore ? Or that
there is a better way to obtain the same effect ?

(I know that there are other ways, but I do not know of any other
*clean* ways to impose such limits -- except pam-ification of course.)

Dirk van Deun
--
Ceterum censeo Redmond delendum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 01:57 PM
Miha Verlic
 
Posts: n/a
Default Re: /etc/limits

Dirk van Deun wrote:
> When you log in with ssh, the file /etc/limits is not read and applied
> like it is when you log in on the console. I have found some very
> old patches for openssh by slackware users (other distributions usually
> do not use /etc/limits; they use PAM -> /etc/security/limits.conf),
> but no recent ones for recent openssh versions. Does this mean
> that slackers just aren't interested in usage limits anymore ? Or that
> there is a better way to obtain the same effect ?
>
> (I know that there are other ways, but I do not know of any other
> *clean* ways to impose such limits -- except pam-ification of course.)
>
> Dirk van Deun


This is a patch for current openssh, with this patch it will obbey
/etc/limits.

http://miha.krneki.org/patches/opens...1-limits.patch

--
Miha
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 01:57 PM
Dominik L. Borkowski
 
Posts: n/a
Default Re: /etc/limits

Dirk van Deun wrote:

> (I know that there are other ways, but I do not know of any other
> *clean* ways to impose such limits -- except pam-ification of course.)


I have a small /etc/profile.d/limits.sh script that gets executed for bash
users and imposes limits. That may be an option for you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 01:58 PM
Miha Verlic
 
Posts: n/a
Default Re: /etc/limits

Dominik L. Borkowski wrote:
> Dirk van Deun wrote:
>
>
>>(I know that there are other ways, but I do not know of any other
>>*clean* ways to impose such limits -- except pam-ification of course.)

>
>
> I have a small /etc/profile.d/limits.sh script that gets executed for bash
> users and imposes limits. That may be an option for you.


....and this script can be easilly stoped before it's executed by
clamping ctrl+c upon entering password...

--
Miha
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 01:58 PM
Martin Lefebvre
 
Posts: n/a
Default Re: /etc/limits

Miha Verlic wrote:
>
> ...and this script can be easilly stoped before it's executed by
> clamping ctrl+c upon entering password...
>


the user doing the ctrl-c would have to be really really fast me thinks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 01:58 PM
Dirk van Deun
 
Posts: n/a
Default Re: /etc/limits

: This is a patch for current openssh, with this patch it will obbey
: /etc/limits.

: http://miha.krneki.org/patches/opens...1-limits.patch

That is a clean and current solution, indeed. Thanks.

Dirk van Deun
--
Ceterum censeo Redmond delendum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 01:58 PM
Dominik L. Borkowski
 
Posts: n/a
Default Re: /etc/limits

Miha Verlic wrote:

>> I have a small /etc/profile.d/limits.sh script that gets executed for
>> bash users and imposes limits. That may be an option for you.

>
> ...and this script can be easilly stoped before it's executed by
> clamping ctrl+c upon entering password...


As somebody has mentioned before, pressing ctrl-c would be a daunting task.
Either way, the solution by no means is bulletproof, and it was never meant
to be. It's to stop casual/random/unintentional abuse of resources rather
than to keep script kiddies at bay from running a fork bomb or use up
memory.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 01:58 PM
Miha Verlic
 
Posts: n/a
Default Re: /etc/limits

Martin Lefebvre wrote:
> Miha Verlic wrote:
>
>>
>> ...and this script can be easilly stoped before it's executed by
>> clamping ctrl+c upon entering password...
>>

>
> the user doing the ctrl-c would have to be really really fast me thinks


actually no - slow line or overloaded CPU and you can easily cancel
execution of profile

--
Miha
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:51 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com