]> TLD Linux GIT Repositories - packages/shadow.git/blob - shadow-login.defs
- updated to 4.15.1, partial PLD merge
[packages/shadow.git] / shadow-login.defs
1 #
2 # /etc/login.defs - Configuration control definitions for the login package.
3 #
4 # Three items must be defined:  MAIL_DIR, ENV_SUPATH, and ENV_PATH.
5 # If unspecified, some arbitrary (and possibly incorrect) value will
6 # be assumed.  All other items are optional - if not specified then
7 # the described action or option will be inhibited.
8 #
9 # Comment lines (lines beginning with "#") and blank lines are ignored.
10 #
11
12 # REQUIRED for useradd/userdel/usermod
13 #   Directory where mailboxes reside, _or_ name of file, relative to the
14 #   home directory.  If you _do_ define MAIL_DIR and MAIL_FILE,
15 #   MAIL_DIR takes precedence.
16 #
17 #   Essentially:
18 #      - MAIL_DIR defines the location of users mail spool files
19 #        (for mbox use) by appending the username to MAIL_DIR as defined
20 #        below.
21 #      - MAIL_FILE defines the location of the users mail spool files as the
22 #        fully-qualified filename obtained by prepending the user home
23 #        directory before $MAIL_FILE
24 #
25 # NOTE: This is no more used for setting up users MAIL environment variable
26 #       which is, starting from shadow 4.0.12-1 in Debian, entirely the
27 #       job of the pam_mail PAM modules
28 #       See default PAM configuration files provided for
29 #       login, su, etc.
30 #
31 # This is a temporary situation: setting these variables will soon
32 # move to /etc/default/useradd and the variables will then be
33 # no more supported
34 MAIL_DIR        /var/mail
35 #MAIL_FILE      .mail
36
37 #
38 # Enable logging and display of /var/log/faillog login failure info.
39 # This option conflicts with the pam_tally PAM module.
40 #
41 FAILLOG_ENAB            yes
42
43 #
44 # Enable display of unknown usernames when login failures are recorded.
45 #
46 # WARNING: Unknown usernames may become world readable. 
47 # See #290803 and #298773 for details about how this could become a security
48 # concern
49 LOG_UNKFAIL_ENAB        no
50
51 #
52 # Enable logging of successful logins
53 #
54 LOG_OK_LOGINS           no
55
56 #
57 # Enable "syslog" logging of su activity - in addition to sulog file logging.
58 # SYSLOG_SG_ENAB does the same for newgrp and sg.
59 #
60 SYSLOG_SU_ENAB          yes
61 SYSLOG_SG_ENAB          yes
62
63 #
64 # If defined, all su activity is logged to this file.
65 #
66 #SULOG_FILE     /var/log/sulog
67
68 #
69 # If defined, file which maps tty line to TERM environment parameter.
70 # Each line of the file is in a format something like "vt100  tty01".
71 #
72 #TTYTYPE_FILE   /etc/ttytype
73
74 #
75 # If defined, login failures will be logged here in a utmp format
76 # last, when invoked as lastb, will read /var/log/btmp, so...
77 #
78 FTMP_FILE       /var/log/btmp
79
80 #
81 # If defined, the command name to display when running "su -".  For
82 # example, if this is defined as "su" then a "ps" will display the
83 # command is "-su".  If not defined, then "ps" would display the
84 # name of the shell actually being run, e.g. something like "-sh".
85 #
86 SU_NAME         su
87
88 #
89 # If defined, file which inhibits all the usual chatter during the login
90 # sequence.  If a full pathname, then hushed mode will be enabled if the
91 # user's name or shell are found in the file.  If not a full pathname, then
92 # hushed mode will be enabled if the file exists in the user's home directory.
93 #
94 HUSHLOGIN_FILE  .hushlogin
95 #HUSHLOGIN_FILE /etc/hushlogins
96
97 #
98 # *REQUIRED*  The default PATH settings, for superuser and normal users.
99 #
100 # (they are minimal, add the rest in the shell startup files)
101 ENV_SUPATH      PATH=/sbin:/bin:/usr/sbin:/usr/bin
102 ENV_PATH        PATH=/bin:/usr/bin
103
104 #
105 # Terminal permissions
106 #
107 #       TTYGROUP        Login tty will be assigned this group ownership.
108 #       TTYPERM         Login tty will be set to this permission.
109 #
110 # If you have a "write" program which is "setgid" to a special group
111 # which owns the terminals, define TTYGROUP to the group number and
112 # TTYPERM to 0620.  Otherwise leave TTYGROUP commented out and assign
113 # TTYPERM to either 622 or 600.
114 #
115 # In Debian /usr/bin/bsd-write or similar programs are setgid tty
116 # However, the default and recommended value for TTYPERM is still 0600
117 # to not allow anyone to write to anyone else console or terminal
118
119 # Users can still allow other people to write them by issuing 
120 # the "mesg y" command.
121
122 TTYGROUP        tty
123 TTYPERM         0600
124
125 #
126 # Login configuration initializations:
127 #
128 #       ERASECHAR       Terminal ERASE character ('\010' = backspace).
129 #       KILLCHAR        Terminal KILL character ('\025' = CTRL/U).
130 #       UMASK           Default "umask" value.
131 #
132 # The ERASECHAR and KILLCHAR are used only on System V machines.
133
134 # UMASK is the default umask value for pam_umask and is used by
135 # useradd and newusers to set the mode of the new home directories.
136 # 022 is the "historical" value in Debian for UMASK
137 # 027, or even 077, could be considered better for privacy
138 # There is no One True Answer here : each sysadmin must make up his/her
139 # mind.
140 #
141 # If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value
142 # for private user groups, i. e. the uid is the same as gid, and username is
143 # the same as the primary group name: for these, the user permissions will be
144 # used as group permissions, e. g. 022 will become 002.
145 #
146 # Prefix these values with "0" to get octal, "0x" to get hexadecimal.
147 #
148 ERASECHAR       0177
149 KILLCHAR        025
150 UMASK           077
151
152 #
153 # Password aging controls:
154 #
155 #       PASS_MAX_DAYS   Maximum number of days a password may be used.
156 #       PASS_MIN_DAYS   Minimum number of days allowed between password changes.
157 #       PASS_WARN_AGE   Number of days warning given before a password expires.
158 #
159 PASS_MAX_DAYS   99999
160 PASS_MIN_DAYS   0
161 PASS_WARN_AGE   7
162
163 #
164 # Min/max values for automatic uid selection in useradd
165 #
166 UID_MIN                  1001
167 UID_MAX                 60000
168 # System accounts
169 SYS_UID_MIN               1
170 SYS_UID_MAX               1000
171
172 #
173 # Min/max values for automatic gid selection in groupadd
174 #
175 GID_MIN                  1001
176 GID_MAX                 60000
177 # System accounts
178 SYS_GID_MIN               10
179 SYS_GID_MAX               1000
180
181 #
182 # Max number of login retries if password is bad. This will most likely be
183 # overriden by PAM, since the default pam_unix module has it's own built
184 # in of 3 retries. However, this is a safe fallback in case you are using
185 # an authentication module that does not enforce PAM_MAXTRIES.
186 #
187 LOGIN_RETRIES           5
188
189 #
190 # Max time in seconds for login
191 #
192 LOGIN_TIMEOUT           60
193
194 #
195 # Which fields may be changed by regular users using chfn - use
196 # any combination of letters "frwh" (full name, room number, work
197 # phone, home phone).  If not defined, no changes are allowed.
198 # For backward compatibility, "yes" = "rwh" and "no" = "frwh".
199
200 CHFN_RESTRICT           rwh
201
202 #
203 # Should login be allowed if we can't cd to the home directory?
204 # Default in no.
205 #
206 DEFAULT_HOME    yes
207
208 #
209 # If defined, this command is run when removing a user.
210 # It should remove any at/cron/print jobs etc. owned by
211 # the user to be removed (passed as the first argument).
212 #
213 #USERDEL_CMD    /usr/sbin/userdel_local
214
215 #
216 # If set to yes, userdel will remove the user's group if it contains no
217 # more members, and useradd will create by default a group with the name
218 # of the user.
219 #
220 # Other former uses of this variable such as setting the umask when
221 # user==primary group are not used in PAM environments, such as Debian
222 #
223 USERGROUPS_ENAB yes
224
225 #
226 # Instead of the real user shell, the program specified by this parameter
227 # will be launched, although its visible name (argv[0]) will be the shell's.
228 # The program may do whatever it wants (logging, additional authentification,
229 # banner, ...) before running the actual shell.
230 #
231 # FAKE_SHELL /bin/fakeshell
232
233 #
234 # If defined, either full pathname of a file containing device names or
235 # a ":" delimited list of device names.  Root logins will be allowed only
236 # upon these devices.
237 #
238 # This variable is used by login and su.
239 #
240 CONSOLE /etc/securecty
241 #CONSOLE        console:tty01:tty02:tty03:tty04
242
243 #
244 # List of groups to add to the user's supplementary group set
245 # when logging in on the console (as determined by the CONSOLE
246 # setting).  Default is none.
247 #
248 # Use with caution - it is possible for users to gain permanent
249 # access to these groups, even when not logged in on the console.
250 # How to do it is left as an exercise for the reader...
251 #
252 # This variable is used by login and su.
253 #
254 #CONSOLE_GROUPS         floppy:audio:cdrom
255
256 #
257 # If set to "yes", new passwords will be encrypted using the MD5-based
258 # algorithm compatible with the one used by recent releases of FreeBSD.
259 # It supports passwords of unlimited length and longer salt strings.
260 # Set to "no" if you need to copy encrypted passwords to other systems
261 # which don't understand the new algorithm.  Default is "no".
262 #
263 # This variable is deprecated. You should use ENCRYPT_METHOD.
264 #
265 #MD5_CRYPT_ENAB no
266
267 #
268 # If set to MD5 , MD5-based algorithm will be used for encrypting password
269 # If set to SHA256, SHA256-based algorithm will be used for encrypting password
270 # If set to SHA512, SHA512-based algorithm will be used for encrypting password
271 # If set to DES, DES-based algorithm will be used for encrypting password (default)
272 # Overrides the MD5_CRYPT_ENAB option
273 #
274 # Note: It is recommended to use a value consistent with
275 # the PAM modules configuration.
276 #
277 ENCRYPT_METHOD SHA512
278
279 #
280 # Only used if ENCRYPT_METHOD is set to SHA256 or SHA512.
281 #
282 # Define the number of SHA rounds.
283 # With a lot of rounds, it is more difficult to brute forcing the password.
284 # But note also that it more CPU resources will be needed to authenticate
285 # users.
286 #
287 # If not specified, the libc will choose the default number of rounds (5000).
288 # The values must be inside the 1000-999999999 range.
289 # If only one of the MIN or MAX values is set, then this value will be used.
290 # If MIN > MAX, the highest value will be used.
291 #
292 # SHA_CRYPT_MIN_ROUNDS 5000
293 # SHA_CRYPT_MAX_ROUNDS 5000
294
295 ################# OBSOLETED BY PAM ##############
296 #                                               #
297 # These options are now handled by PAM. Please  #
298 # edit the appropriate file in /etc/pam.d/ to   #
299 # enable the equivelants of them.               #
300 #                                               #
301 #################################################
302
303 #MOTD_FILE
304 #DIALUPS_CHECK_ENAB
305 #LASTLOG_ENAB
306 #MAIL_CHECK_ENAB
307 #OBSCURE_CHECKS_ENAB
308 #PORTTIME_CHECKS_ENAB
309 #SU_WHEEL_ONLY
310 #CRACKLIB_DICTPATH
311 #PASS_CHANGE_TRIES
312 #PASS_ALWAYS_WARN
313 #ENVIRON_FILE
314 #NOLOGINS_FILE
315 #ISSUE_FILE
316 #PASS_MIN_LEN
317 #PASS_MAX_LEN
318 #ULIMIT
319 #ENV_HZ
320 #CHFN_AUTH
321 #CHSH_AUTH
322 #FAIL_DELAY
323
324 ################# OBSOLETED #######################
325 #                                                 #
326 # These options are no longer handled by shadow.  #
327 #                                                 #
328 # Shadow utilities will display a warning if they #
329 # still appear.                                   #
330 #                                                 #
331 ###################################################
332
333 #CLOSE_SESSIONS
334 #LOGIN_STRING
335 #NO_PASSWORD_CONSOLE
336 #QMAIL_DIR