LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-12-2004, 10:34 AM   #1
ruleman
LQ Newbie
 
Registered: Feb 2004
Distribution: Slackware 9.1
Posts: 22

Rep: Reputation: 15
limiting users using gradm/acl


Hi guys, I want to know how to limit users background process, maximum cpu usage, memory usage for each user using gradm/acl (or another way) I'm running kernel 2.4.26+grsecurity on my box. Thanks.
 
Old 06-12-2004, 07:24 PM   #2
ruleman
LQ Newbie
 
Registered: Feb 2004
Distribution: Slackware 9.1
Posts: 22

Original Poster
Rep: Reputation: 15
any suggestion ?
 
Old 06-13-2004, 05:45 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Before you're going to do this ask yourself why you want it, and why you choose that route. You should probably first start basic hardening of the box, make sure only services, processess you authorise are runnable and accessable by authorised users. Ditching any compilers and unnecessary packages, restricting access to interpreters to a select group, mounting /home (where *all* your unprivileged userss homes are, right) with noexec,nodev,nosuid, using GRSecurity's proc restrictions, auditing, TPE, making sure users $TMP lies within their home, else mount /tmp and /var/tmp with nosuid,noexec too (might break some, like mc's executing scripts but thats only a nuisance) is a start.Update everyting til current and top that part off with running Bastille-Linux and Tiger to catch stuff you've overlooked (authentication, passwd aging, "bad" services, setuid/setgid root binaries, cron, at, tcp wrapper access lists etc etc).

While both deal with limits, with GRSec's ACL's you focu5 on per-process restrictions while PAM_limits focusses on users and groups (and users own processes). For (unprivileged) user limiting I'd say you best start using PAM_limits. Once enabled GRSec will notice any errors in processes too and log 'em. Then you've got some leads on which regular processes to ACL (else just enable ACL's in learning mode). For background processes there's daemons. Search Freshmeat. If careless (when renicing/killing processes as root user) based on the process name can lead to interesting things if users get the chance to rename their process to something legitimate, or something other users use.
 
Old 06-13-2004, 10:35 PM   #4
ruleman
LQ Newbie
 
Registered: Feb 2004
Distribution: Slackware 9.1
Posts: 22

Original Poster
Rep: Reputation: 15
Thank you unspawn. I'm going to open a shell company and i need to how to limit users background processes, cpu usage, memory usage, etc. I'm using gradm/acl but i don't understand it as well. There is group u1bg and its users has to have 1 background process. The group u2bg 's users has to have 2 background processes. How can i do that using gradm/acl ? If you can give me a sample acl i'll be pleased. I also sent you an e-mail files you want on http://www.linuxquestions.org/questi...hreadid=181974
I'm waiting your answers. Thank you again.
 
Old 06-14-2004, 05:37 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Not using GRSec ACL's. What you want is a background process killer. Search Freshmeat for it. If you're lucky you'll be able to compile the Fush (Foosh) shell (search Sourceforge) which has logging and explicit (background) command control. Would make a nice addition to using GRSec's TPE.
 
Old 06-17-2004, 11:41 PM   #6
ruleman
LQ Newbie
 
Registered: Feb 2004
Distribution: Slackware 9.1
Posts: 22

Original Poster
Rep: Reputation: 15
i was unable to run it. I got readline erors while i ./configure it. I installed readline libs and readline devel libs on my system, but result was same. Is there any script for this job ?
 
Old 06-19-2004, 04:55 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I got problems too compiling it. That's why I said you gotta be lucky to be able to compile it :-] No script I know of, unless you mean the interpreted type of background process killers (shell, Perl). I know Freshmeat has some.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
limiting users sql databases amadkow Linux - General 1 08-09-2005 11:05 AM
Limiting Users Obie Linux - Security 6 05-29-2004 05:01 PM
a question reguarding limiting users Projectxx Linux - General 3 04-06-2003 01:30 AM
Limiting users RedHatter Linux - Security 7 08-30-2002 05:03 AM
limiting users access iquadri1 Linux - Networking 1 09-04-2001 01:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration