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