You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

388 lines
10 KiB

  1. #
  2. # /etc/login.defs - Configuration control definitions for the shadow package.
  3. #
  4. # $Id: login.defs 3189 2010-03-26 11:53:06Z nekral-guest $
  5. #
  6. #
  7. # Delay in seconds before being allowed another attempt after a login failure
  8. # Note: When PAM is used, some modules may enfore a minimal delay (e.g.
  9. # pam_unix enforces a 2s delay)
  10. #
  11. FAIL_DELAY 3
  12. #
  13. # Enable logging and display of /var/log/faillog login failure info.
  14. #
  15. #FAILLOG_ENAB
  16. #
  17. # Enable display of unknown usernames when login failures are recorded.
  18. #
  19. LOG_UNKFAIL_ENAB no
  20. #
  21. # Enable logging of successful logins
  22. #
  23. LOG_OK_LOGINS no
  24. #
  25. # Enable logging and display of /var/log/lastlog login time info.
  26. #
  27. #LASTLOG_ENAB
  28. #
  29. # Enable checking and display of mailbox status upon login.
  30. #
  31. # Disable if the shell startup files already check for mail
  32. # ("mailx -e" or equivalent).
  33. #
  34. #MAIL_CHECK_ENAB
  35. #
  36. # Enable additional checks upon password changes.
  37. #
  38. #OBSCURE_CHECKS_ENAB
  39. #
  40. # Enable checking of time restrictions specified in /etc/porttime.
  41. #
  42. #PORTTIME_CHECKS_ENAB
  43. #
  44. # Enable setting of ulimit, umask, and niceness from passwd gecos field.
  45. #
  46. #QUOTAS_ENAB
  47. #
  48. # Enable "syslog" logging of su activity - in addition to sulog file logging.
  49. # SYSLOG_SG_ENAB does the same for newgrp and sg.
  50. #
  51. SYSLOG_SU_ENAB yes
  52. SYSLOG_SG_ENAB yes
  53. #
  54. # If defined, either full pathname of a file containing device names or
  55. # a ":" delimited list of device names. Root logins will be allowed only
  56. # upon these devices.
  57. #
  58. CONSOLE /etc/securetty
  59. #CONSOLE console:tty01:tty02:tty03:tty04
  60. #
  61. # If defined, all su activity is logged to this file.
  62. #
  63. #SULOG_FILE /var/log/sulog
  64. #
  65. # If defined, ":" delimited list of "message of the day" files to
  66. # be displayed upon login.
  67. #
  68. #MOTD_FILE
  69. #MOTD_FILE
  70. #
  71. # If defined, this file will be output before each login prompt.
  72. #
  73. #ISSUE_FILE /etc/issue
  74. #
  75. # If defined, file which maps tty line to TERM environment parameter.
  76. # Each line of the file is in a format something like "vt100 tty01".
  77. #
  78. #TTYTYPE_FILE /etc/ttytype
  79. #
  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...
  82. #
  83. #FTMP_FILE
  84. #
  85. # If defined, name of file whose presence which will inhibit non-root
  86. # logins. The contents of this file should be a message indicating
  87. # why logins are inhibited.
  88. #
  89. #NOLOGINS_FILE
  90. #
  91. # If defined, the command name to display when running "su -". For
  92. # example, if this is defined as "su" then a "ps" will display the
  93. # command is "-su". If not defined, then "ps" would display the
  94. # name of the shell actually being run, e.g. something like "-sh".
  95. #
  96. SU_NAME su
  97. #
  98. # *REQUIRED*
  99. # Directory where mailboxes reside, _or_ name of file, relative to the
  100. # home directory. If you _do_ define both, MAIL_DIR takes precedence.
  101. #
  102. MAIL_DIR /var/spool/mail
  103. #MAIL_FILE .mail
  104. #
  105. # If defined, file which inhibits all the usual chatter during the login
  106. # sequence. If a full pathname, then hushed mode will be enabled if the
  107. # user's name or shell are found in the file. If not a full pathname, then
  108. # hushed mode will be enabled if the file exists in the user's home directory.
  109. #
  110. HUSHLOGIN_FILE .hushlogin
  111. #HUSHLOGIN_FILE /etc/hushlogins
  112. #
  113. # If defined, either a TZ environment parameter spec or the
  114. # fully-rooted pathname of a file containing such a spec.
  115. #
  116. #ENV_TZ TZ=CST6CDT
  117. #ENV_TZ /etc/tzname
  118. #
  119. # If defined, an HZ environment parameter spec.
  120. #
  121. # for Linux/x86
  122. #ENV_HZ
  123. # For Linux/Alpha...
  124. #ENV_HZ
  125. #
  126. # *REQUIRED* The default PATH settings, for superuser and normal users.
  127. #
  128. # (they are minimal, add the rest in the shell startup files)
  129. ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin
  130. ENV_PATH PATH=/bin:/usr/bin
  131. #
  132. # Terminal permissions
  133. #
  134. # TTYGROUP Login tty will be assigned this group ownership.
  135. # TTYPERM Login tty will be set to this permission.
  136. #
  137. # If you have a "write" program which is "setgid" to a special group
  138. # which owns the terminals, define TTYGROUP to the group number and
  139. # TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign
  140. # TTYPERM to either 622 or 600.
  141. #
  142. TTYGROUP tty
  143. TTYPERM 0600
  144. #
  145. # Login configuration initializations:
  146. #
  147. # ERASECHAR Terminal ERASE character ('\010' = backspace).
  148. # KILLCHAR Terminal KILL character ('\025' = CTRL/U).
  149. # ULIMIT Default "ulimit" value.
  150. #
  151. # The ERASECHAR and KILLCHAR are used only on System V machines.
  152. # The ULIMIT is used only if the system supports it.
  153. # (now it works with setrlimit too; ulimit is in 512-byte units)
  154. #
  155. # Prefix these values with "0" to get octal, "0x" to get hexadecimal.
  156. #
  157. ERASECHAR 0177
  158. KILLCHAR 025
  159. #ULIMIT 2097152
  160. # Default initial "umask" value used by login on non-PAM enabled systems.
  161. # Default "umask" value for pam_umask on PAM enabled systems.
  162. # UMASK is also used by useradd and newusers to set the mode of new home
  163. # directories.
  164. # 022 is the default value, but 027, or even 077, could be considered
  165. # better for privacy. There is no One True Answer here: each sysadmin
  166. # must make up her mind.
  167. UMASK 022
  168. #
  169. # Password aging controls:
  170. #
  171. # PASS_MAX_DAYS Maximum number of days a password may be used.
  172. # PASS_MIN_DAYS Minimum number of days allowed between password changes.
  173. # PASS_MIN_LEN Minimum acceptable password length.
  174. # PASS_WARN_AGE Number of days warning given before a password expires.
  175. #
  176. PASS_MAX_DAYS 99999
  177. PASS_MIN_DAYS 0
  178. #PASS_MIN_LEN
  179. PASS_WARN_AGE 7
  180. #
  181. # If "yes", the user must be listed as a member of the first gid 0 group
  182. # in /etc/group (called "root" on most Linux systems) to be able to "su"
  183. # to uid 0 accounts. If the group doesn't exist or is empty, no one
  184. # will be able to "su" to uid 0.
  185. #
  186. #SU_WHEEL_ONLY
  187. #
  188. # If compiled with cracklib support, where are the dictionaries
  189. #
  190. #CRACKLIB_DICTPATH
  191. #
  192. # Min/max values for automatic uid selection in useradd
  193. #
  194. UID_MIN 1000
  195. UID_MAX 60000
  196. # System accounts
  197. SYS_UID_MIN 101
  198. SYS_UID_MAX 999
  199. #
  200. # Min/max values for automatic gid selection in groupadd
  201. #
  202. GID_MIN 1000
  203. GID_MAX 60000
  204. # System accounts
  205. SYS_GID_MIN 101
  206. SYS_GID_MAX 999
  207. #
  208. # Max number of login retries if password is bad
  209. #
  210. LOGIN_RETRIES 5
  211. #
  212. # Max time in seconds for login
  213. #
  214. LOGIN_TIMEOUT 60
  215. #
  216. # Maximum number of attempts to change password if rejected (too easy)
  217. #
  218. #PASS_CHANGE_TRIES
  219. #
  220. # Warn about weak passwords (but still allow them) if you are root.
  221. #
  222. #PASS_ALWAYS_WARN
  223. #
  224. # Number of significant characters in the password for crypt().
  225. # Default is 8, don't change unless your crypt() is better.
  226. # Ignored if MD5_CRYPT_ENAB set to "yes".
  227. #
  228. #PASS_MAX_LEN 8
  229. #
  230. # Require password before chfn/chsh can make any changes.
  231. #
  232. #CHFN_AUTH
  233. #
  234. # Which fields may be changed by regular users using chfn - use
  235. # any combination of letters "frwh" (full name, room number, work
  236. # phone, home phone). If not defined, no changes are allowed.
  237. # For backward compatibility, "yes" = "rwh" and "no" = "frwh".
  238. #
  239. CHFN_RESTRICT rwh
  240. #
  241. # Password prompt (%s will be replaced by user name).
  242. #
  243. # XXX - it doesn't work correctly yet, for now leave it commented out
  244. # to use the default which is just "Password: ".
  245. #LOGIN_STRING "%s's Password: "
  246. #
  247. # Only works if compiled with MD5_CRYPT defined:
  248. # If set to "yes", new passwords will be encrypted using the MD5-based
  249. # algorithm compatible with the one used by recent releases of FreeBSD.
  250. # It supports passwords of unlimited length and longer salt strings.
  251. # Set to "no" if you need to copy encrypted passwords to other systems
  252. # which don't understand the new algorithm. Default is "no".
  253. #
  254. # Note: If you use PAM, it is recommended to use a value consistent with
  255. # the PAM modules configuration.
  256. #
  257. # This variable is deprecated. You should use ENCRYPT_METHOD.
  258. #
  259. #MD5_CRYPT_ENAB no
  260. #
  261. # Only works if compiled with ENCRYPTMETHOD_SELECT defined:
  262. # If set to MD5 , MD5-based algorithm will be used for encrypting password
  263. # If set to SHA256, SHA256-based algorithm will be used for encrypting password
  264. # If set to SHA512, SHA512-based algorithm will be used for encrypting password
  265. # If set to DES, DES-based algorithm will be used for encrypting password (default)
  266. # Overrides the MD5_CRYPT_ENAB option
  267. #
  268. # Note: If you use PAM, it is recommended to use a value consistent with
  269. # the PAM modules configuration.
  270. #
  271. #ENCRYPT_METHOD DES
  272. #
  273. # Only works if ENCRYPT_METHOD is set to SHA256 or SHA512.
  274. #
  275. # Define the number of SHA rounds.
  276. # With a lot of rounds, it is more difficult to brute forcing the password.
  277. # But note also that it more CPU resources will be needed to authenticate
  278. # users.
  279. #
  280. # If not specified, the libc will choose the default number of rounds (5000).
  281. # The values must be inside the 1000-999999999 range.
  282. # If only one of the MIN or MAX values is set, then this value will be used.
  283. # If MIN > MAX, the highest value will be used.
  284. #
  285. # SHA_CRYPT_MIN_ROUNDS 5000
  286. # SHA_CRYPT_MAX_ROUNDS 5000
  287. #
  288. # List of groups to add to the user's supplementary group set
  289. # when logging in on the console (as determined by the CONSOLE
  290. # setting). Default is none.
  291. #
  292. # Use with caution - it is possible for users to gain permanent
  293. # access to these groups, even when not logged in on the console.
  294. # How to do it is left as an exercise for the reader...
  295. #
  296. #CONSOLE_GROUPS floppy:audio:cdrom
  297. #
  298. # Should login be allowed if we can't cd to the home directory?
  299. # Default in no.
  300. #
  301. DEFAULT_HOME yes
  302. #
  303. # If this file exists and is readable, login environment will be
  304. # read from it. Every line should be in the form name=value.
  305. #
  306. #ENVIRON_FILE
  307. #
  308. # If defined, this command is run when removing a user.
  309. # It should remove any at/cron/print jobs etc. owned by
  310. # the user to be removed (passed as the first argument).
  311. #
  312. #USERDEL_CMD /usr/sbin/userdel_local
  313. #
  314. # Enable setting of the umask group bits to be the same as owner bits
  315. # (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is
  316. # the same as gid, and username is the same as the primary group name.
  317. #
  318. # This also enables userdel to remove user groups if no members exist.
  319. #
  320. USERGROUPS_ENAB yes
  321. #
  322. # If set to a non-nul number, the shadow utilities will make sure that
  323. # groups never have more than this number of users on one line.
  324. # This permit to support split groups (groups split into multiple lines,
  325. # with the same group ID, to avoid limitation of the line length in the
  326. # group file).
  327. #
  328. # 0 is the default value and disables this feature.
  329. #
  330. #MAX_MEMBERS_PER_GROUP 0
  331. #
  332. # If useradd should create home directories for users by default (non
  333. # system users only)
  334. # This option is overridden with the -M or -m flags on the useradd command
  335. # line.
  336. #
  337. #CREATE_HOME yes