Initial commit for Tizen
[profile/extras/shadow-utils.git] / doc / README.limits
1
2 ABOUT shadow-login limits:
3
4 This code is merged into shadow login program from the original LShell 2.01
5 written by Joel Katz. The port and some additional features have been added
6 by Cristian Gafton (gafton@sorosis.ro).
7
8
9 Changes:
10         - 96/04/16
11                 - {spaces,tabs} allowed within limits string
12                 - Warn via syslog multiple default limits
13                 - added few paragraphs to the login man page
14         - 96/04/14
15                 - code merged into lmain.c --cristiang
16
17 TODO:   - support groups in the limits file
18           (only usernames are supported at this momment :-( )
19
20 Setting user limits for shadow login program
21
22 First, make a root-only-readable file (/etc/limits by default or LIMITS_FILE
23 defined config.h) that describes the resource limits you wish to impose. By
24 default no quotas are imposed on 'root'. In fact, there is no way to impose
25 limits via this procedure to root-equiv accounts (accounts with UID 0).
26
27 Each line describes a limit for a user in the form:
28
29         user LIMITS_STRING
30
31 The LIMITS_STRING is a string of a concatenated list of resource limits.
32 Each limit consists of a letter identifier followed by a numerical limit.
33 The valid identifiers are:
34
35         A: max address space (KB)
36         C: max core file size (KB)
37         D: max data size (KB)
38         F: maximum filesize (KB)
39         M: max locked-in-memory address space (KB)
40         N: max number of open files
41         R: max resident set size (KB)
42         S: max stack size (KB)
43         T: max CPU time (MIN)
44         U: max number of processes
45         L: max number of logins for this user
46
47 For example, L2D2048N5 is a valid LIMITS_STRING. For reading convenience,
48 the following entries are equivalent:
49
50 username L2D2048N5
51 username L2 D2048 N5
52
53 Be aware that after <username> the rest of the line is considered a limit
54 string, thus comments are not allowed. A invalid limits string will be
55 rejected (not considered) by the login program.
56
57 The default entry is denoted by username '*'. If you have multiple 'default'
58 entries in your LIMITS_FILE, then the last one will be used as the default
59 entry.
60
61 To completely disable limits for a user, a single dash (-) will do.
62
63 Also, please note that all limit settings are set PER LOGIN.  They are
64 not global, nor are they permanent.  Perhaps global limits will come, but
65 for now this will have to do ;)
66