Limit User resources

From Wiki

Jump to: navigation, search

1. As root:

vi /etc/security/limits.conf
#add the following line, where steve is the user:
sburke hard nproc 5
#save and close the text editor.
#The user will not be able to run more than 5 processes at the same time.

2. ssh sburke@localhost

ps -eaf | grep sburke | ls /var/tmp | less
-bash: fork: Resource temporarily unavailable



References:

http://www.debian.org/doc/manuals/securing-debian-howto/ch4.en.html#s-user-limits

http://www.cyberciti.biz/tips/linux-limiting-user-process.html

Personal tools