📄 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 + -