Home · Kontakt · Impressum
contents index previous up next
Next: 8.3 Einrichten eines Benutzers Up: 8.2 Das Benutzerkonto Previous: 8.2.5 chpasswd


8.2.6 /etc/login.defs

Die Datei /etc/login.defs enthält die Einstellungen für den Login-Vorgang. Alle Einträge sind optional. Fehlen diese, so gelten sie als nicht gesetzt. Wie in den meisten Konfigurationsskripten üblich werden Kommentarzeilen (beginnen mit einem `#') und leere Zeilen ignoriert.

Hier ein Beispiel für die /etc/login.defs. Wie in guten Installationen üblich ergeben sich die Bedeutungen der Einträge aus den vorangestellten Kommentaren.

# Delay in seconds before being allowed another attempt after a login failure
#
FAIL_DELAY		3

# Enable logging and display of /var/log/faillog login failure info.
#
FAILLOG_ENAB		yes

# Enable display of unknown usernames when login failures are recorded.
#
LOG_UNKFAIL_ENAB	no

# Enable logging and display of /var/log/lastlog login time info.
#
LASTLOG_ENAB		yes

# Enable additional checks upon password changes.
#
OBSCURE_CHECKS_ENAB	yes

# If defined, ":" delimited list of "message of the day" files to
# be displayed upon login.
#
MOTD_FILE	/etc/motd
#MOTD_FILE	/etc/motd:/usr/lib/news/news-motd

# If defined, file which maps tty line to TERM environment parameter.
# Each line of the file is in a format something like "vt100  tty01".
#
TTYTYPE_FILE	/etc/ttytype

# If defined, login failures will be logged here in a utmp format.
# last, when invoked as lastb, will read /var/log/btmp, so...
#
#FTMP_FILE	/var/log/btmp

# If defined, file which inhibits all the usual chatter during the login
# sequence.  If a full pathname, then hushed mode will be enabled if the
# user's name or shell are found in the file.  If not a full pathname, then
# hushed mode will be enabled if the file exists in the user's home directory.
#
#HUSHLOGIN_FILE	.hushlogin
HUSHLOGIN_FILE	/etc/hushlogins

# The default PATH settings.
#
ENV_PATH                /usr/local/bin:/usr/bin:/bin

# The default PATH settings for root:
#
ENV_ROOTPATH            /sbin:/bin:/usr/sbin:/usr/bin

# Terminal permissions
#
#	TTYGROUP	Login tty will be assigned this group ownership.
#	TTYPERM		Login tty will be set to this permission.
#
# If you have a "write" program which is "setgid" to a special group
# which owns the terminals, define TTYGROUP to the group number and
# TTYPERM to 0620.  Otherwise leave TTYGROUP commented out and assign
# TTYPERM to either 622 or 600.
#
TTYGROUP	tty
TTYPERM		0620

# Password aging controls:
#
#	PASS_MAX_DAYS	Maximum number of days a password may be used.
#	PASS_MIN_DAYS	Minimum number of days allowed between password changes.
#	PASS_MIN_LEN	Minimum acceptable password length.
#	PASS_WARN_AGE	Number of days warning given before a password expires.
#
PASS_MAX_DAYS	99999
PASS_MIN_DAYS	0
PASS_MIN_LEN	5
PASS_WARN_AGE	7

# If compiled with cracklib support, where are the dictionaries
#
CRACKLIB_DICTPATH	/usr/lib/cracklib_dict

# Min/max values for automatic uid selection in useradd
#
UID_MIN			  100
UID_MAX			60000

# Min/max values for automatic gid selection in groupadd
#
GID_MIN			  100
GID_MAX			60000

# Max number of login retries if password is bad
#
LOGIN_RETRIES		3

# Max time in seconds for login
#
LOGIN_TIMEOUT		60

# Maximum number of attempts to change password if rejected (too easy)
#
PASS_CHANGE_TRIES	3

# Warn about weak passwords (but still allow them) if you are root.
#
PASS_ALWAYS_WARN	yes

# Number of significant characters in the password for crypt().
# Default is 8, don't change unless your crypt() is better.
# Ignored if the "md5" option is given to the pam_pwcheck module.
#
PASS_MAX_LEN		8

# Require password before chfn/chsh can make any changes.
#
CHFN_AUTH		yes

# Which fields may be changed by regular users using chfn - use
# any combination of letters "frwh" (full name, room number, work
# phone, home phone).  If not defined, no changes are allowed.
# For backward compatibility, "yes" = "rwh" and "no" = "frwh".
#
CHFN_RESTRICT		rwh

# Should login be allowed if we can't cd to the home directory?
# Default is yes.
#
DEFAULT_HOME		yes



  © 2004 by IT-Dozent Ole Vanhoefer · Zum Seitenanfang