1
###############################################################################
2
# WARNING: This configuration file is maintained by Juju. Local changes may
4
###############################################################################
6
# /etc/login.defs - Configuration control definitions for the login package.
8
# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH.
9
# If unspecified, some arbitrary (and possibly incorrect) value will
10
# be assumed. All other items are optional - if not specified then
11
# the described action or option will be inhibited.
13
# Comment lines (lines beginning with "#") and blank lines are ignored.
15
# Modified for Linux. --marekm
17
# REQUIRED for useradd/userdel/usermod
18
# Directory where mailboxes reside, _or_ name of file, relative to the
19
# home directory. If you _do_ define MAIL_DIR and MAIL_FILE,
20
# MAIL_DIR takes precedence.
23
# - MAIL_DIR defines the location of users mail spool files
24
# (for mbox use) by appending the username to MAIL_DIR as defined
26
# - MAIL_FILE defines the location of the users mail spool files as the
27
# fully-qualified filename obtained by prepending the user home
28
# directory before $MAIL_FILE
30
# NOTE: This is no more used for setting up users MAIL environment variable
31
# which is, starting from shadow 4.0.12-1 in Debian, entirely the
32
# job of the pam_mail PAM modules
33
# See default PAM configuration files provided for
36
# This is a temporary situation: setting these variables will soon
37
# move to /etc/default/useradd and the variables will then be
43
# Enable logging and display of /var/log/faillog login failure info.
44
# This option conflicts with the pam_tally PAM module.
49
# Enable display of unknown usernames when login failures are recorded.
51
# WARNING: Unknown usernames may become world readable.
52
# See #290803 and #298773 for details about how this could become a security
57
# Enable logging of successful logins
62
# Enable "syslog" logging of su activity - in addition to sulog file logging.
63
# SYSLOG_SG_ENAB does the same for newgrp and sg.
69
# If defined, all su activity is logged to this file.
71
#SULOG_FILE /var/log/sulog
74
# If defined, file which maps tty line to TERM environment parameter.
75
# Each line of the file is in a format something like "vt100 tty01".
77
#TTYTYPE_FILE /etc/ttytype
80
# If defined, login failures will be logged here in a utmp format
81
# last, when invoked as lastb, will read /var/log/btmp, so...
83
FTMP_FILE /var/log/btmp
86
# If defined, the command name to display when running "su -". For
87
# example, if this is defined as "su" then a "ps" will display the
88
# command is "-su". If not defined, then "ps" would display the
89
# name of the shell actually being run, e.g. something like "-sh".
94
# If defined, file which inhibits all the usual chatter during the login
95
# sequence. If a full pathname, then hushed mode will be enabled if the
96
# user's name or shell are found in the file. If not a full pathname, then
97
# hushed mode will be enabled if the file exists in the user's home directory.
99
HUSHLOGIN_FILE .hushlogin
100
#HUSHLOGIN_FILE /etc/hushlogins
103
# *REQUIRED* The default PATH settings, for superuser and normal users.
105
# (they are minimal, add the rest in the shell startup files)
106
ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
107
ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin{% if additional_user_paths %}{{ additional_user_paths }}{% endif %}
110
# Terminal permissions
112
# TTYGROUP Login tty will be assigned this group ownership.
113
# TTYPERM Login tty will be set to this permission.
115
# If you have a "write" program which is "setgid" to a special group
116
# which owns the terminals, define TTYGROUP to the group number and
117
# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign
118
# TTYPERM to either 622 or 600.
120
# In Debian /usr/bin/bsd-write or similar programs are setgid tty
121
# However, the default and recommended value for TTYPERM is still 0600
122
# to not allow anyone to write to anyone else console or terminal
124
# Users can still allow other people to write them by issuing
125
# the "mesg y" command.
131
# Login configuration initializations:
133
# ERASECHAR Terminal ERASE character ('\010' = backspace).
134
# KILLCHAR Terminal KILL character ('\025' = CTRL/U).
135
# UMASK Default "umask" value.
137
# The ERASECHAR and KILLCHAR are used only on System V machines.
139
# UMASK is the default umask value for pam_umask and is used by
140
# useradd and newusers to set the mode of the new home directories.
141
# 022 is the "historical" value in Debian for UMASK
142
# 027, or even 077, could be considered better for privacy
143
# There is no One True Answer here : each sysadmin must make up his/her
146
# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value
147
# for private user groups, i. e. the uid is the same as gid, and username is
148
# the same as the primary group name: for these, the user permissions will be
149
# used as group permissions, e. g. 022 will become 002.
151
# Prefix these values with "0" to get octal, "0x" to get hexadecimal.
157
# Enable setting of the umask group bits to be the same as owner bits (examples: `022` -> `002`, `077` -> `007`) for non-root users, if the uid is the same as gid, and username is the same as the primary group name.
158
# If set to yes, userdel will remove the user´s group if it contains no more members, and useradd will create by default a group with the name of the user.
162
# Password aging controls:
164
# PASS_MAX_DAYS Maximum number of days a password may be used.
165
# PASS_MIN_DAYS Minimum number of days allowed between password changes.
166
# PASS_WARN_AGE Number of days warning given before a password expires.
168
PASS_MAX_DAYS {{ pwd_max_age }}
169
PASS_MIN_DAYS {{ pwd_min_age }}
173
# Min/max values for automatic uid selection in useradd
175
UID_MIN {{ uid_min }}
178
SYS_UID_MIN {{ sys_uid_min }}
179
SYS_UID_MAX {{ sys_uid_max }}
181
# Min/max values for automatic gid selection in groupadd
182
GID_MIN {{ gid_min }}
185
SYS_GID_MIN {{ sys_gid_min }}
186
SYS_GID_MAX {{ sys_gid_max }}
189
# Max number of login retries if password is bad. This will most likely be
190
# overriden by PAM, since the default pam_unix module has it's own built
191
# in of 3 retries. However, this is a safe fallback in case you are using
192
# an authentication module that does not enforce PAM_MAXTRIES.
194
LOGIN_RETRIES {{ login_retries }}
197
# Max time in seconds for login
199
LOGIN_TIMEOUT {{ login_timeout }}
202
# Which fields may be changed by regular users using chfn - use
203
# any combination of letters "frwh" (full name, room number, work
204
# phone, home phone). If not defined, no changes are allowed.
205
# For backward compatibility, "yes" = "rwh" and "no" = "frwh".
207
{% if chfn_restrict %}
208
CHFN_RESTRICT {{ chfn_restrict }}
212
# Should login be allowed if we can't cd to the home directory?
215
DEFAULT_HOME {% if allow_login_without_home %} yes {% else %} no {% endif %}
218
# If defined, this command is run when removing a user.
219
# It should remove any at/cron/print jobs etc. owned by
220
# the user to be removed (passed as the first argument).
222
#USERDEL_CMD /usr/sbin/userdel_local
225
# Enable setting of the umask group bits to be the same as owner bits
226
# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is
227
# the same as gid, and username is the same as the primary group name.
229
# If set to yes, userdel will remove the user´s group if it contains no
230
# more members, and useradd will create by default a group with the name
236
# Instead of the real user shell, the program specified by this parameter
237
# will be launched, although its visible name (argv[0]) will be the shell's.
238
# The program may do whatever it wants (logging, additional authentification,
239
# banner, ...) before running the actual shell.
241
# FAKE_SHELL /bin/fakeshell
244
# If defined, either full pathname of a file containing device names or
245
# a ":" delimited list of device names. Root logins will be allowed only
246
# upon these devices.
248
# This variable is used by login and su.
250
#CONSOLE /etc/consoles
251
#CONSOLE console:tty01:tty02:tty03:tty04
254
# List of groups to add to the user's supplementary group set
255
# when logging in on the console (as determined by the CONSOLE
256
# setting). Default is none.
258
# Use with caution - it is possible for users to gain permanent
259
# access to these groups, even when not logged in on the console.
260
# How to do it is left as an exercise for the reader...
262
# This variable is used by login and su.
264
#CONSOLE_GROUPS floppy:audio:cdrom
267
# If set to "yes", new passwords will be encrypted using the MD5-based
268
# algorithm compatible with the one used by recent releases of FreeBSD.
269
# It supports passwords of unlimited length and longer salt strings.
270
# Set to "no" if you need to copy encrypted passwords to other systems
271
# which don't understand the new algorithm. Default is "no".
273
# This variable is deprecated. You should use ENCRYPT_METHOD.
278
# If set to MD5 , MD5-based algorithm will be used for encrypting password
279
# If set to SHA256, SHA256-based algorithm will be used for encrypting password
280
# If set to SHA512, SHA512-based algorithm will be used for encrypting password
281
# If set to DES, DES-based algorithm will be used for encrypting password (default)
282
# Overrides the MD5_CRYPT_ENAB option
284
# Note: It is recommended to use a value consistent with
285
# the PAM modules configuration.
287
ENCRYPT_METHOD SHA512
290
# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512.
292
# Define the number of SHA rounds.
293
# With a lot of rounds, it is more difficult to brute forcing the password.
294
# But note also that it more CPU resources will be needed to authenticate
297
# If not specified, the libc will choose the default number of rounds (5000).
298
# The values must be inside the 1000-999999999 range.
299
# If only one of the MIN or MAX values is set, then this value will be used.
300
# If MIN > MAX, the highest value will be used.
302
# SHA_CRYPT_MIN_ROUNDS 5000
303
# SHA_CRYPT_MAX_ROUNDS 5000
305
################# OBSOLETED BY PAM ##############
307
# These options are now handled by PAM. Please #
308
# edit the appropriate file in /etc/pam.d/ to #
309
# enable the equivelants of them.
318
#PORTTIME_CHECKS_ENAB
334
################# OBSOLETED #######################
336
# These options are no more handled by shadow. #
338
# Shadow utilities will display a warning if they #
341
###################################################
345
# NO_PASSWORD_CONSOLE