mikeblas

old login.defs

Jul 11th, 2026
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.19 KB | Source Code | 0 0
  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/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/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 is the default umask value for pam_umask and is used by
  136. # useradd and newusers to set the mode of the new home directories.
  137. # 022 is the "historical" value in Debian for UMASK
  138. # 027, or even 077, could be considered better for privacy
  139. # There is no One True Answer here : each sysadmin must make up his/her
  140. # mind.
  141. #
  142. # If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value
  143. # for private user groups, i. e. the uid is the same as gid, and username is
  144. # the same as the primary group name: for these, the user permissions will be
  145. # used as group permissions, e. g. 022 will become 002.
  146. #
  147. # Prefix these values with "0" to get octal, "0x" to get hexadecimal.
  148. #
  149. ERASECHAR 0177
  150. KILLCHAR 025
  151. UMASK 022
  152.  
  153. # HOME_MODE is used by useradd(8) and newusers(8) to set the mode for new
  154. # home directories.
  155. # If HOME_MODE is not set, the value of UMASK is used to create the mode.
  156. #HOME_MODE 0700
  157.  
  158. #
  159. # Password aging controls:
  160. #
  161. # PASS_MAX_DAYS Maximum number of days a password may be used.
  162. # PASS_MIN_DAYS Minimum number of days allowed between password changes.
  163. # PASS_WARN_AGE Number of days warning given before a password expires.
  164. #
  165. PASS_MAX_DAYS 99999
  166. PASS_MIN_DAYS 0
  167. PASS_WARN_AGE 7
  168.  
  169. #
  170. # Min/max values for automatic uid selection in useradd
  171. #
  172. UID_MIN 1000
  173. UID_MAX 60000
  174. # System accounts
  175. #SYS_UID_MIN 100
  176. #SYS_UID_MAX 999
  177. # Extra per user uids
  178. SUB_UID_MIN 100000
  179. SUB_UID_MAX 600100000
  180. SUB_UID_COUNT 65536
  181.  
  182. #
  183. # Min/max values for automatic gid selection in groupadd
  184. #
  185. GID_MIN 1000
  186. GID_MAX 60000
  187. # System accounts
  188. #SYS_GID_MIN 100
  189. #SYS_GID_MAX 999
  190. # Extra per user group ids
  191. SUB_GID_MIN 100000
  192. SUB_GID_MAX 600100000
  193. SUB_GID_COUNT 65536
  194.  
  195. #
  196. # Max number of login retries if password is bad. This will most likely be
  197. # overriden by PAM, since the default pam_unix module has it's own built
  198. # in of 3 retries. However, this is a safe fallback in case you are using
  199. # an authentication module that does not enforce PAM_MAXTRIES.
  200. #
  201. LOGIN_RETRIES 5
  202.  
  203. #
  204. # Max time in seconds for login
  205. #
  206. LOGIN_TIMEOUT 60
  207.  
  208. #
  209. # Which fields may be changed by regular users using chfn - use
  210. # any combination of letters "frwh" (full name, room number, work
  211. # phone, home phone). If not defined, no changes are allowed.
  212. # For backward compatibility, "yes" = "rwh" and "no" = "frwh".
  213. #
  214. CHFN_RESTRICT rwh
  215.  
  216. #
  217. # Should login be allowed if we can't cd to the home directory?
  218. # Default is no.
  219. #
  220. DEFAULT_HOME yes
  221.  
  222. #
  223. # If defined, this command is run when removing a user.
  224. # It should remove any at/cron/print jobs etc. owned by
  225. # the user to be removed (passed as the first argument).
  226. #
  227. #USERDEL_CMD /usr/sbin/userdel_local
  228.  
  229. #
  230. # If set to yes, userdel will remove the user's group if it contains no
  231. # more members, and useradd will create by default a group with the name
  232. # of the user.
  233. #
  234. # Other former uses of this variable such as setting the umask when
  235. # user==primary group are not used in PAM environments, such as Debian
  236. #
  237. USERGROUPS_ENAB yes
  238.  
  239. #
  240. # Instead of the real user shell, the program specified by this parameter
  241. # will be launched, although its visible name (argv[0]) will be the shell's.
  242. # The program may do whatever it wants (logging, additional authentification,
  243. # banner, ...) before running the actual shell.
  244. #
  245. # FAKE_SHELL /bin/fakeshell
  246.  
  247. #
  248. # If defined, either full pathname of a file containing device names or
  249. # a ":" delimited list of device names. Root logins will be allowed only
  250. # upon these devices.
  251. #
  252. # This variable is used by login and su.
  253. #
  254. #CONSOLE /etc/consoles
  255. #CONSOLE console:tty01:tty02:tty03:tty04
  256.  
  257. #
  258. # List of groups to add to the user's supplementary group set
  259. # when logging in on the console (as determined by the CONSOLE
  260. # setting). Default is none.
  261. #
  262. # Use with caution - it is possible for users to gain permanent
  263. # access to these groups, even when not logged in on the console.
  264. # How to do it is left as an exercise for the reader...
  265. #
  266. # This variable is used by login and su.
  267. #
  268. #CONSOLE_GROUPS floppy:audio:cdrom
  269.  
  270. #
  271. # If set to "yes", new passwords will be encrypted using the MD5-based
  272. # algorithm compatible with the one used by recent releases of FreeBSD.
  273. # It supports passwords of unlimited length and longer salt strings.
  274. # Set to "no" if you need to copy encrypted passwords to other systems
  275. # which don't understand the new algorithm. Default is "no".
  276. #
  277. # This variable is deprecated. You should use ENCRYPT_METHOD.
  278. #
  279. #MD5_CRYPT_ENAB no
  280.  
  281. #
  282. # If set to MD5, MD5-based algorithm will be used for encrypting password
  283. # If set to SHA256, SHA256-based algorithm will be used for encrypting password
  284. # If set to SHA512, SHA512-based algorithm will be used for encrypting password
  285. # If set to BCRYPT, BCRYPT-based algorithm will be used for encrypting password
  286. # If set to YESCRYPT, YESCRYPT-based algorithm will be used for encrypting password
  287. # If set to DES, DES-based algorithm will be used for encrypting password (default)
  288. # MD5 and DES should not be used for new hashes, see crypt(5) for recommendations.
  289. # Overrides the MD5_CRYPT_ENAB option
  290. #
  291. # Note: It is recommended to use a value consistent with
  292. # the PAM modules configuration.
  293. #
  294. ENCRYPT_METHOD SHA512
  295.  
  296. #
  297. # Only works if ENCRYPT_METHOD is set to SHA256 or SHA512.
  298. #
  299. # Define the number of SHA rounds.
  300. # With a lot of rounds, it is more difficult to brute-force the password.
  301. # However, more CPU resources will be needed to authenticate users if
  302. # this value is increased.
  303. #
  304. # If not specified, the libc will choose the default number of rounds (5000),
  305. # which is orders of magnitude too low for modern hardware.
  306. # The values must be within the 1000-999999999 range.
  307. # If only one of the MIN or MAX values is set, then this value will be used.
  308. # If MIN > MAX, the highest value will be used.
  309. #
  310. #SHA_CRYPT_MIN_ROUNDS 5000
  311. #SHA_CRYPT_MAX_ROUNDS 5000
  312.  
  313. #
  314. # Only works if ENCRYPT_METHOD is set to YESCRYPT.
  315. #
  316. # Define the YESCRYPT cost factor.
  317. # With a higher cost factor, it is more difficult to brute-force the password.
  318. # However, more CPU time and more memory will be needed to authenticate users
  319. # if this value is increased.
  320. #
  321. # If not specified, a cost factor of 5 will be used.
  322. # The value must be within the 1-11 range.
  323. #
  324. #YESCRYPT_COST_FACTOR 5
  325.  
  326. #
  327. # The pwck(8) utility emits a warning for any system account with a home
  328. # directory that does not exist. Some system accounts intentionally do
  329. # not have a home directory. Such accounts may have this string as
  330. # their home directory in /etc/passwd to avoid a spurious warning.
  331. #
  332. NONEXISTENT /nonexistent
  333.  
  334. #
  335. # Allow newuidmap and newgidmap when running under an alternative
  336. # primary group.
  337. #
  338. #GRANT_AUX_GROUP_SUBIDS yes
  339.  
  340. #
  341. # Prevents an empty password field to be interpreted as "no authentication
  342. # required".
  343. # Set to "yes" to prevent for all accounts
  344. # Set to "superuser" to prevent for UID 0 / root (default)
  345. # Set to "no" to not prevent for any account (dangerous, historical default)
  346. PREVENT_NO_AUTH superuser
  347.  
  348. #
  349. # Select the HMAC cryptography algorithm.
  350. # Used in pam_timestamp module to calculate the keyed-hash message
  351. # authentication code.
  352. #
  353. # Note: It is recommended to check hmac(3) to see the possible algorithms
  354. # that are available in your system.
  355. #
  356. #HMAC_CRYPTO_ALGO SHA512
  357.  
  358. ################# OBSOLETED BY PAM ##############
  359. # #
  360. # These options are now handled by PAM. Please #
  361. # edit the appropriate file in /etc/pam.d/ to #
  362. # enable the equivelants of them.
  363. #
  364. ###############
  365.  
  366. #MOTD_FILE
  367. #DIALUPS_CHECK_ENAB
  368. #LASTLOG_ENAB
  369. #MAIL_CHECK_ENAB
  370. #OBSCURE_CHECKS_ENAB
  371. #PORTTIME_CHECKS_ENAB
  372. #SU_WHEEL_ONLY
  373. #CRACKLIB_DICTPATH
  374. #PASS_CHANGE_TRIES
  375. #PASS_ALWAYS_WARN
  376. #ENVIRON_FILE
  377. #NOLOGINS_FILE
  378. #ISSUE_FILE
  379. #PASS_MIN_LEN
  380. #PASS_MAX_LEN
  381. #ULIMIT
  382. #ENV_HZ
  383. #CHFN_AUTH
  384. #CHSH_AUTH
  385. #FAIL_DELAY
  386.  
  387. ################# OBSOLETED #######################
  388. # #
  389. # These options are no more handled by shadow. #
  390. # #
  391. # Shadow utilities will display a warning if they #
  392. # still appear. #
  393. # #
  394. ###################################################
  395.  
  396. # CLOSE_SESSIONS
  397. # LOGIN_STRING
  398. # NO_PASSWORD_CONSOLE
  399. # QMAIL_DIR
Advertisement
Add Comment
Please, Sign In to add comment