Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-01-2004, 11:26 PM   #1
LQ Newbie
Registered: Apr 2003
Posts: 26

Rep: Reputation: 15

once upon a time, a funny user run these C++ code in my computer.

#include <stdlib.h>

int main() {
   while (1) {fork();}
oh, yes. I can remove his account for punishment.
But I think it would be better if I can do something to prevent such thing happen.

what can I do?
Old 01-02-2004, 05:51 AM   #2
Registered: Dec 2003
Location: Layer 7 =D
Distribution: Slackware, LFS, Rock Linux
Posts: 165

Rep: Reputation: 30
1. prevent those funny users from using your mightiest weapon-your compiler ^^
2. prevent them from installing, copying, moving any binarys. and maybe even prevent them from making any file executable ^^ just do a little scripting...
3. punish them if they are still feeling funny =)

hehe....I'm a bastard ^^
Old 01-02-2004, 07:55 AM   #3
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Rep: Reputation: 30
It is an interesting problem I've never asked myself before. I was looking for some information, and I found something, that may be useful
What I think you should do is to establish a limit for the number of processes a "normal" user can own (perhaps a good idea is also limiting the number of files that a process can open, to avoid more problems in the future).
How can you achieve this? Several ways:

1) check "man limits". With a file called "/etc/limits" you can easily do it.

2) Maybe another possibility:
(however, it could be a bit old, I have no idea about it )

3) You could do it by hand: a couple of scripts... it should be possible

I hope it helps (EDIT>) you to give a "funny" surprise to this "funny user".

Last edited by Y0jiMb0; 01-02-2004 at 07:59 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
more on fork() feetyouwell Programming 6 09-17-2004 12:18 PM
fork() vibhory2j Linux - Software 1 05-24-2004 05:11 AM
Fork again Avatar33 Programming 13 08-22-2003 02:41 PM
fork() lowlifeish Programming 3 11-04-2002 11:50 AM
Fork Ztyx Linux - General 1 08-31-2002 12:25 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:25 PM.

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