2 ABOUT shadow-login limits:
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).
11 - {spaces,tabs} allowed within limits string
12 - Warn via syslog multiple default limits
13 - added few paragraphs to the login man page
15 - code merged into lmain.c --cristiang
17 TODO: - support groups in the limits file
18 (only usernames are supported at this momment :-( )
20 Setting user limits for shadow login program
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).
27 Each line describes a limit for a user in the form:
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:
35 A: max address space (KB)
36 C: max core file 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)
44 U: max number of processes
45 L: max number of logins for this user
47 For example, L2D2048N5 is a valid LIMITS_STRING. For reading convenience,
48 the following entries are equivalent:
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.
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
61 To completely disable limits for a user, a single dash (-) will do.
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 ;)