shadow/man/limits.5

115 lines
2.6 KiB
Groff

.\" Title: limits
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
.\" Date: 06/20/2006
.\" Manual: File Formats and Conversions
.\" Source: File Formats and Conversions
.\"
.TH "LIMITS" "5" "06/20/2006" "File Formats and Conversions" "File Formats and Conversions"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
limits \- resource limits definition
.SH "DESCRIPTION"
.PP
The
\fIlimits\fR
file (\fI/etc/limits\fR
by default or LIMITS_FILE defined
\fIconfig.h\fR) describes the resource limits you wish to impose. It should be owned by root and readable by root account only.
.PP
By default no quota is imposed on 'root'. In fact, there is no way to impose limits via this procedure to root\-equiv accounts (accounts with UID 0).
.PP
Each line describes a limit for a user in the form:
.PP
\fIuser LIMITS_STRING\fR
.PP
The
\fILIMITS_STRING\fR
is a string of a concatenated list of resource limits. Each limit consists of a letter identifier followed by a numerical limit.
.PP
The valid identifiers are:
.TP 3n
\(bu
A: max address space (KB)
.TP 3n
\(bu
C: max core file size (KB)
.TP 3n
\(bu
D: max data size (KB)
.TP 3n
\(bu
F: maximum filesize (KB)
.TP 3n
\(bu
M: max locked\-in\-memory address space (KB)
.TP 3n
\(bu
N: max number of open files
.TP 3n
\(bu
R: max resident set size (KB)
.TP 3n
\(bu
S: max stack size (KB)
.TP 3n
\(bu
T: max CPU time (MIN)
.TP 3n
\(bu
U: max number of processes
.TP 3n
\(bu
K: file creation mask, set by
\fBumask\fR(2).
.TP 3n
\(bu
L: max number of logins for this user
.TP 3n
\(bu
P: process priority, set by
\fBsetpriority\fR(2).
.sp
.RE
.PP
For example,
\fIL2D2048N5\fR
is a valid
\fILIMITS_STRING \fR. For reading convenience, the following entries are equivalent:
.sp
.RS 3n
.nf
username L2D2048N5
username L2 D2048 N5
.fi
.RE
.PP
Be aware that after
\fIusername\fR
the rest of the line is considered a limit string, thus comments are not allowed. A invalid limits string will be rejected (not considered) by the
\fBlogin\fR
program.
.PP
The default entry is denoted by username "\fI*\fR". If you have multiple
\fIdefault\fR
entries in your
\fILIMITS_FILE\fR, then the last one will be used as the default entry.
.PP
To completely disable limits for a user, a single dash "\fI\-\fR" will do.
.PP
Also, please note that all limit settings are set PER LOGIN. They are not global, nor are they permanent. Perhaps global limits will come, but for now this will have to do ;)
.SH "FILES"
.TP 3n
\fI/etc/limits\fR
.SH "SEE ALSO"
.PP
\fBlogin\fR(1),
\fBsetpriority\fR(2),
\fBsetrlimit\fR(2).