?? 00000002.htm
字號:
<HTML><HEAD> <TITLE>BBS水木清華站∶精華區</TITLE></HEAD><BODY><CENTER><H1>BBS水木清華站∶精華區</H1></CENTER>發信人: hellguard (小四★笑看風云), 信區: Linux <BR>標 題: Re: 怎樣限制一個用戶可以啟動的進程數? (轉載) <BR>發信站: BBS 水木清華站 (Tue Sep 28 13:27:18 1999) <BR> <BR>edit /etc/pam.d/login <BR> <BR>#%PAM-1.0 <BR>auth required /lib/security/pam_securetty.so <BR>auth required /lib/security/pam_pwdb.so shadow nullok <BR>auth required /lib/security/pam_nologin.so <BR>account required /lib/security/pam_pwdb.so <BR>password required /lib/security/pam_cracklib.so <BR>password required /lib/security/pam_pwdb.so shadow nullok use_authtok <BR>session required /lib/security/pam_pwdb.so <BR>session required /lib/security/pam_limits.so <BR> <BR>you have to add the last two lines <BR> <BR>edit /etc/security/limits.conf <BR> <BR># /etc/security/limits.conf <BR># <BR>#Each line describes a limit for a user in the form: <BR># <BR>#<domain> <type> <item> <value> <BR># <BR>#Where: <BR>#<domain> can be: <BR># - an user name <BR># - a group name, with @group syntax <BR># - the wildcard *, for default entry <BR># <BR>#<type> can have the two values: <BR># - "soft" for enforcing the soft limits <BR># - "hard" for enforcing hard limits <BR># <BR>#<item> can be one of the following: <BR># - core - limits the core file size (KB) <BR># - data - max data size (KB) <BR># - fsize - maximum filesize (KB) <BR># - memlock - max locked-in-memory address space (KB) <BR># - nofile - max number of open files <BR># - rss - max resident set size (KB) <BR># - stack - max stack size (KB) <BR># - cpu - max CPU time (MIN) <BR># - nproc - max number of processes <BR># - as - address space limit <BR># - maxlogins - max number of logins for this user <BR># <BR>#<domain> <type> <item> <value> <BR># <BR> <BR>#* soft core 0 <BR>#* hard rss 10000 <BR>#@student hard nproc 20 <BR>#@faculty soft nproc 20 <BR>#@faculty hard nproc 50 <BR>#ftp hard nproc 0 <BR>#@student - maxlogins 4 <BR> <BR> <BR> as you can see you can limit the number of process and much more <BR> like cpu, stack ... <BR> <BR> <BR>-- <BR> <BR> 也許有一天,他再從海上蓬蓬的雨點中升起, <BR> 飛向西來,再形成一道江流,再沖倒兩旁的石壁, <BR> 再來尋夾岸的桃花。然而,我不敢說來生,也不敢信來生...... <BR> <BR>※ 來源:·BBS 水木清華站 bbs.net.tsinghua.edu.cn·[FROM: 203.207.226.124] <BR><CENTER><H1>BBS水木清華站∶精華區</H1></CENTER></BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -