xref: /freebsd/lib/libutil/login.conf.5 (revision d6917af2b9da76ac1df1977b2a3c09fb9d45db11)
1561d61caSDavid Nugent.\" Copyright (c) 1996 David Nugent <davidn@blaze.net.au>
2561d61caSDavid Nugent.\" All rights reserved.
3561d61caSDavid Nugent.\"
4561d61caSDavid Nugent.\" Redistribution and use in source and binary forms, with or without
5561d61caSDavid Nugent.\" modification, is permitted provided that the following conditions
6561d61caSDavid Nugent.\" are met:
7561d61caSDavid Nugent.\" 1. Redistributions of source code must retain the above copyright
8561d61caSDavid Nugent.\"    notice immediately at the beginning of the file, without modification,
9561d61caSDavid Nugent.\"    this list of conditions, and the following disclaimer.
10561d61caSDavid Nugent.\" 2. Redistributions in binary form must reproduce the above copyright
11561d61caSDavid Nugent.\"    notice, this list of conditions and the following disclaimer in the
12561d61caSDavid Nugent.\"    documentation and/or other materials provided with the distribution.
13561d61caSDavid Nugent.\" 3. This work was done expressly for inclusion into FreeBSD.  Other use
14561d61caSDavid Nugent.\"    is permitted provided this notation is included.
15561d61caSDavid Nugent.\" 4. Absolutely no warranty of function or purpose is made by the author
16561d61caSDavid Nugent.\"    David Nugent.
17561d61caSDavid Nugent.\" 5. Modifications may be freely made to this file providing the above
18561d61caSDavid Nugent.\"    conditions are met.
19561d61caSDavid Nugent.\"
20ab2f6ae8SEd Maste.Dd June 28, 2023
21561d61caSDavid Nugent.Dt LOGIN.CONF 5
22a307d598SRuslan Ermilov.Os
23561d61caSDavid Nugent.Sh NAME
24561d61caSDavid Nugent.Nm login.conf
25561d61caSDavid Nugent.Nd login class capability database
26561d61caSDavid Nugent.Sh SYNOPSIS
27561d61caSDavid Nugent.Pa /etc/login.conf ,
28273b52ceSDavid Nugent.Pa ~/.login_conf
29561d61caSDavid Nugent.Sh DESCRIPTION
303b8ecdbbSRuslan Ermilov.Nm
313a049969SAlexey Zelkincontains various attributes and capabilities of login classes.
32561d61caSDavid NugentA login class (an optional annotation against each record in the user
33561d61caSDavid Nugentaccount database,
34561d61caSDavid Nugent.Pa /etc/master.passwd )
35561d61caSDavid Nugentdetermines session accounting, resource limits and user environment settings.
36561d61caSDavid NugentIt is used by various programs in the system to set up a user's login
37561d61caSDavid Nugentenvironment and to enforce policy, accounting and administrative restrictions.
38561d61caSDavid NugentIt also provides the means by which users are able to be
39561d61caSDavid Nugentauthenticated to the system and the types of authentication available.
409f7b7e45SDavid SchultzAttributes in addition to the ones described here are available with
419f7b7e45SDavid Schultzthird-party packages.
42561d61caSDavid Nugent.Pp
43561d61caSDavid NugentA special record "default" in the system user class capability database
44561d61caSDavid Nugent.Pa /etc/login.conf
45561d61caSDavid Nugentis used automatically for any
46561d61caSDavid Nugentnon-root user without a valid login class in
47561d61caSDavid Nugent.Pa /etc/master.passwd .
48561d61caSDavid NugentA user with a uid of 0 without a valid login class will use the record
49561d61caSDavid Nugent"root" if it exists, or "default" if not.
50561d61caSDavid Nugent.Pp
5123f182d7SEitan AdlerUsers may individually create a file called
52273b52ceSDavid Nugent.Pa .login_conf
53561d61caSDavid Nugentin their home directory using the same format, consisting of a single
54561d61caSDavid Nugententry with a record id of "me".
55561d61caSDavid NugentIf present, this file is used by
56561d61caSDavid Nugent.Xr login 1
57561d61caSDavid Nugentto set user-defined environment settings which override those specified
58561d61caSDavid Nugentin the system login capabilities database.
59561d61caSDavid NugentOnly a subset of login capabilities may be overridden, typically those
60561d61caSDavid Nugentwhich do not involve authentication, resource limits and accounting.
61561d61caSDavid Nugent.Pp
62561d61caSDavid NugentRecords in a class capabilities database consist of a number of
63561d61caSDavid Nugentcolon-separated fields.
64561d61caSDavid NugentThe first entry for each record gives one or more names that a record is
65561d61caSDavid Nugentto be known by, each separated by a '|' character.
66561d61caSDavid NugentThe first name is the most common abbreviation.
67561d61caSDavid NugentThe last name given should be a long name that is more descriptive
68561d61caSDavid Nugentof the capability entry, and all others are synonyms.
69561d61caSDavid NugentAll names but the last should be in lower case and contain no blanks;
70561d61caSDavid Nugentthe last name may contain upper case characters and blanks for
71561d61caSDavid Nugentreadability.
72561d61caSDavid Nugent.Pp
73f0d43ae9SRuslan ErmilovNote that since a colon
74f0d43ae9SRuslan Ermilov.Pq Ql :\&
75f0d43ae9SRuslan Ermilovis used to separate capability entries, a
76f0d43ae9SRuslan Ermilov.Ql \ec
77f0d43ae9SRuslan Ermilovescape sequence must be used to embed a literal colon in the
785e058b33STom Rhodesvalue or name of a capability.
795e058b33STom Rhodes.Pp
8059fa1b55STom RhodesThe default
81ef8bcbfbSTom Rhodes.Pa /etc/login.conf
8259fa1b55STom Rhodesshipped with
8359fa1b55STom Rhodes.Fx
8459fa1b55STom Rhodesis an out of the box configuration.
859c512d4aSTom RhodesWhenever changes to this, or
869c512d4aSTom Rhodesthe user's
879c512d4aSTom Rhodes.Pa ~/.login_conf ,
8859fa1b55STom Rhodesfile are made, the modifications will not be picked up until
89ef8bcbfbSTom Rhodes.Xr cap_mkdb 1
90ef8bcbfbSTom Rhodesis used to compile the file into a database.
9159fa1b55STom RhodesThis database file will have a
9259fa1b55STom Rhodes.Pa .db
939c512d4aSTom Rhodesextension and is accessed through
9459fa1b55STom Rhodes.Xr cgetent 3 .
95561d61caSDavid NugentSee
96561d61caSDavid Nugent.Xr getcap 3
97561d61caSDavid Nugentfor a more in-depth description of the format of a capability database.
98561d61caSDavid Nugent.Sh CAPABILITIES
99561d61caSDavid NugentFields within each record in the database follow the
100561d61caSDavid Nugent.Xr getcap 3
101561d61caSDavid Nugentconventions for boolean, type string
102561d61caSDavid Nugent.Ql \&=
103561d61caSDavid Nugentand type numeric
104561d61caSDavid Nugent.Ql \&# ,
105a4df5101SSheldon Hearnalthough type numeric is deprecated in favour of the string format and
106561d61caSDavid Nugenteither form is accepted for a numeric datum.
107561d61caSDavid NugentValues fall into the following categories:
108561d61caSDavid Nugent.Bl -tag -width "program"
10922524ffbSRobert Watson.It bool
11022524ffbSRobert WatsonIf the name is present, then the boolean value is true; otherwise, it is
11122524ffbSRobert Watsonfalse
112561d61caSDavid Nugent.It file
113561d61caSDavid NugentPath name to a data file
114561d61caSDavid Nugent.It program
115561d61caSDavid NugentPath name to an executable file
116561d61caSDavid Nugent.It list
117561d61caSDavid NugentA list of values (or pairs of values) separated by commas or spaces
118561d61caSDavid Nugent.It path
119561d61caSDavid NugentA space or comma separated list of path names, following the usual csh
120561d61caSDavid Nugentconventions (leading tilde with and without username being expanded to
121561d61caSDavid Nugenthome directories etc.)
122561d61caSDavid Nugent.It number
123561d61caSDavid NugentA numeric value, either decimal (default), hexadecimal (with leading 0x),
124561d61caSDavid Nugentor octal (with a leading 0).
125561d61caSDavid NugentWith a numeric type, only one numeric value is allowed.
1261a0a9345SRuslan ErmilovNumeric types may also be specified in string format (i.e., the capability
127561d61caSDavid Nugenttag being delimited from the value by '=' instead of '#').
128561d61caSDavid NugentWhichever method is used, then all records in the database must use the
129561d61caSDavid Nugentsame method to allow values to be correctly overridden in interpolated
130561d61caSDavid Nugentrecords.
131efac066dSEitan AdlerA numeric value may be infinite.
132561d61caSDavid Nugent.It size
133561d61caSDavid NugentA number which expresses a size.
134561d61caSDavid NugentThe default interpretation of a value is the number of bytes, but a
135561d61caSDavid Nugentsuffix may specify alternate units:
136561d61caSDavid Nugent.Bl -tag -offset indent -compact -width xxxx
137561d61caSDavid Nugent.It b
138561d61caSDavid Nugentexplicitly selects 512-byte blocks
139561d61caSDavid Nugent.It k
140561d61caSDavid Nugentselects kilobytes (1024 bytes)
141561d61caSDavid Nugent.It m
142d649be87SSatoshi Asamispecifies a multiplier of 1 megabyte (1048576 bytes),
143561d61caSDavid Nugent.It g
144561d61caSDavid Nugentspecifies units of gigabytes, and
145561d61caSDavid Nugent.It t
146664b1978SThomas Gellekumrepresents terabytes.
147561d61caSDavid Nugent.El
148561d61caSDavid NugentA size value is a numeric quantity and case of the suffix is not significant.
149561d61caSDavid NugentConcatenated values are added together.
150efac066dSEitan AdlerA size value may be infinite.
151561d61caSDavid Nugent.It time
152561d61caSDavid NugentA period of time, by default in seconds.
1533a049969SAlexey ZelkinA prefix may specify a different unit:
154561d61caSDavid Nugent.Bl -tag -offset indent -compact -width xxxx
155561d61caSDavid Nugent.It y
156561d61caSDavid Nugentindicates the number of 365 day years,
157561d61caSDavid Nugent.It w
158561d61caSDavid Nugentindicates the number of weeks,
159561d61caSDavid Nugent.It d
160561d61caSDavid Nugentthe number of days,
161561d61caSDavid Nugent.It h
162b916ff7fSSteve Pricethe number of hours,
163b916ff7fSSteve Price.It m
164561d61caSDavid Nugentthe number of minutes, and
165561d61caSDavid Nugent.It s
166561d61caSDavid Nugentthe number of seconds.
167561d61caSDavid Nugent.El
168561d61caSDavid NugentConcatenated values are added together.
169561d61caSDavid NugentFor example, 2 hours and 40 minutes may be written either as
170561d61caSDavid Nugent9600s, 160m or 2h40m.
171efac066dSEitan AdlerA time value may be infinite.
172561d61caSDavid Nugent.El
173561d61caSDavid Nugent.Pp
174efac066dSEitan Adler.Dq infinity ,
175efac066dSEitan Adler.Dq inf ,
176efac066dSEitan Adler.Dq unlimited ,
177efac066dSEitan Adler.Dq unlimit,
178efac066dSEitan Adlerand -1
179efac066dSEitan Adlerare considered infinite values.
180efac066dSEitan Adler.Pp
181561d61caSDavid NugentThe usual convention to interpolate capability entries using the special
182561d61caSDavid Nugent.Em tc=value
183561d61caSDavid Nugentnotation may be used.
18492b2c435SOlivier Certner.Pp
18592b2c435SOlivier CertnerDefault values are specified in the
18692b2c435SOlivier Certner.Ql Default
18792b2c435SOlivier Certnercolumn.
18892b2c435SOlivier CertnerIf there is no default, the value is inherited from the process setting up the
18992b2c435SOlivier Certnerlogin environment.
190561d61caSDavid Nugent.Sh RESOURCE LIMITS
191bc093719SEd Schouten.Bl -column pseudoterminals indent indent
19292b2c435SOlivier Certner.It Sy "Name	Type	Default	Description"
193c2965cd1SJoel Dahl.It "coredumpsize	size		Maximum coredump size limit."
194c2965cd1SJoel Dahl.It "cputime	time		CPU usage limit."
195c2965cd1SJoel Dahl.It "datasize	size		Maximum data size limit."
196c2965cd1SJoel Dahl.It "filesize	size		Maximum file size limit."
197c2965cd1SJoel Dahl.It "maxproc	number		Maximum number of processes."
198c2965cd1SJoel Dahl.It "memorylocked	size		Maximum locked in core memory size limit."
199c2965cd1SJoel Dahl.It "memoryuse	size		Maximum of core memory use size limit."
200c2965cd1SJoel Dahl.It "openfiles	number		Maximum number of open files per process."
201c2965cd1SJoel Dahl.It "sbsize	size		Maximum permitted socketbuffer size."
202c2965cd1SJoel Dahl.It "vmemoryuse	size		Maximum permitted total VM usage per process."
203c2965cd1SJoel Dahl.It "stacksize	size		Maximum stack size limit."
204c2965cd1SJoel Dahl.It "pseudoterminals	number		Maximum number of pseudo-terminals."
205c2965cd1SJoel Dahl.It "swapuse	size		Maximum swap space size limit."
206250d9fd8SKonstantin Belousov.It "umtxp	number		Maximum number of process-shared pthread locks."
207*d6917af2SMaxim Konovalov.It "pipebuf	size		Maximum size of pipe buffers."
208561d61caSDavid Nugent.El
209561d61caSDavid Nugent.Pp
210561d61caSDavid NugentThese resource limit entries actually specify both the maximum
211561d61caSDavid Nugentand current limits (see
212561d61caSDavid Nugent.Xr getrlimit 2 ) .
213708b0425SDavid E. O'BrienThe current (soft) limit is the one normally used, although the user is
214708b0425SDavid E. O'Brienpermitted to increase the current limit to the maximum (hard) limit.
215561d61caSDavid NugentThe maximum and current limits may be specified individually by appending a
216561d61caSDavid Nugent-max or -cur to the capability name.
217561d61caSDavid Nugent.Sh ENVIRONMENT
218561d61caSDavid Nugent.Bl -column ignorenologin indent xbinxxusrxbin
21992b2c435SOlivier Certner.It Sy "Name	Type	Default	Description"
22061a0bf2aSJoel Dahl.It "charset	string		Set $MM_CHARSET environment variable to the specified"
221561d61caSDavid Nugentvalue.
222c2965cd1SJoel Dahl.It "cpumask	string		List of cpus to bind the user to."
223d84c4292SBrooks DavisThe syntax is the same as for the
224d84c4292SBrooks Davis.Fl l
225d84c4292SBrooks Davisargument of
2267b1d17a1SGlen Barber.Xr cpuset 1
2277b1d17a1SGlen Barberor the word
228d84c4292SBrooks Davis.Ql default .
229d84c4292SBrooks DavisIf set to
230d84c4292SBrooks Davis.Ql default
231d84c4292SBrooks Davisno action is taken.
232c2965cd1SJoel Dahl.It "hushlogin	bool	false	Same as having a ~/.hushlogin file."
233c2965cd1SJoel Dahl.It "ignorenologin	bool	false	Login not prevented by nologin."
234c2965cd1SJoel Dahl.It "ftp-chroot	bool	false	Limit FTP access with"
2351575f75dSPeter Pentchev.Xr chroot 2
2361575f75dSPeter Pentchevto the
2371575f75dSPeter Pentchev.Ev HOME
2381575f75dSPeter Pentchevdirectory of the user.
2391575f75dSPeter PentchevSee
2401575f75dSPeter Pentchev.Xr ftpd 8
2411575f75dSPeter Pentchevfor details.
242c2965cd1SJoel Dahl.It "label	string		Default MAC policy; see"
2432db19028SChris Costello.Xr maclabel 7 .
24466265da7SJoel Dahl.It "lang	string		Set $LANG environment variable to the specified value."
245acf2957eSKyle Evans.It "mail	string		Set $MAIL environment variable to the specified value."
24666265da7SJoel Dahl.It "manpath	path		Default search path for manpages."
24766265da7SJoel Dahl.It "nocheckmail	bool	false	Display mail status at login."
24866265da7SJoel Dahl.It "nologin	file		If the file exists it will be displayed and"
249561d61caSDavid Nugentthe login session will be terminated.
25066265da7SJoel Dahl.It "path	path	/bin /usr/bin	Default search path."
251aa96945eSOlivier Certner.It "priority	number	0	Initial priority level."
252aa96945eSOlivier CertnerA value in the nice range
253aa96945eSOlivier Certner.Pq -20 to 20 included ,
254aa96945eSOlivier Certnerextended below with the 32 real-time class priorities
255aa96945eSOlivier Certner.Po
256aa96945eSOlivier Certnerso -52 maps to priority 0 in the real-time class, -51 to 1, and so on until -21
257aa96945eSOlivier Certnerwhich maps to 31; see
258aa96945eSOlivier Certner.Xr rtprio 1
259aa96945eSOlivier Certner.Pc
260aa96945eSOlivier Certnerand above with the 32 idle class priorities
261aa96945eSOlivier Certner.Po
262aa96945eSOlivier Certnerso 21 maps to priority 0 in the idle class, 22 to 1, and so on until 52 which
263aa96945eSOlivier Certnermaps to 31; see
264aa96945eSOlivier Certner.Xr idprio 1
265aa96945eSOlivier Certner.Pc .
26633d4ce54SOlivier CertnerSpecial value
26733d4ce54SOlivier Certner.Ql inherit
26833d4ce54SOlivier Certnerprevents resetting the priority.
26966265da7SJoel Dahl.It "requirehome 	bool	false	Require a valid home directory to login."
27066265da7SJoel Dahl.It "setenv	list		A comma-separated list of environment variables and"
271561d61caSDavid Nugentvalues to which they are to be set.
272ab2f6ae8SEd MasteValues containing commas must be quoted.
27366265da7SJoel Dahl.It "shell	prog		Session shell to execute rather than the"
274c6ff3a1bSSheldon Hearnshell specified in the passwd file.
275c6ff3a1bSSheldon HearnThe SHELL environment variable will
276561d61caSDavid Nugentcontain the shell specified in the password file.
27766265da7SJoel Dahl.It "term	string		Default terminal type if not able to determine"
278708b0425SDavid E. O'Brienfrom other means.
27966265da7SJoel Dahl.It "timezone	string		Default value of $TZ environment variable."
2800d1fe948SOlivier Certner.It "umask	number		Initial umask. Should always have a leading 0 to"
281561d61caSDavid Nugentensure octal interpretation.
282ea9bd448SOlivier CertnerSpecial value
283ea9bd448SOlivier Certner.Ql inherit
284ea9bd448SOlivier Certnerexplicitly indicates not to change the umask.
28566265da7SJoel Dahl.It "welcome	file	/etc/motd	File containing welcome message."
286561d61caSDavid Nugent.El
287561d61caSDavid Nugent.Sh AUTHENTICATION
2889f7b7e45SDavid Schultz.Bl -column passwd_prompt indent indent
28992b2c435SOlivier Certner.It Sy "Name	Type	Default	Description"
290708b0425SDavid E. O'Brien.\" .It "approve	program 	Program to approve login.
29166265da7SJoel Dahl.It "copyright	file		File containing additional copyright information"
29266265da7SJoel Dahl.It "host.allow	list		List of remote host wildcards from which users in"
293708b0425SDavid E. O'Brienthe class may access.
29466265da7SJoel Dahl.It "host.deny	list		List of remote host wildcards from which users"
295708b0425SDavid E. O'Brienin the class may not access.
29666265da7SJoel Dahl.It "login_prompt	string		The login prompt given by"
297078ae588SDavid E. O'Brien.Xr login 1
29866265da7SJoel Dahl.It "login-backoff	number	3	The number of login attempts"
299df788a52SMurray Stokelyallowed before the backoff delay is inserted after each subsequent
300df788a52SMurray Stokelyattempt.
301b208d15bSChristian BruefferThe backoff delay is the number of tries above
302b208d15bSChristian Brueffer.Em login-backoff
303b208d15bSChristian Brueffermultiplied by 5 seconds.
30466265da7SJoel Dahl.It "login-retries	number	10	The number of login attempts"
305df788a52SMurray Stokelyallowed before the login fails.
306b4f56035SDag-Erling Smørgrav.It "passwd_format	string	sha512	The encryption format that new or"
307d29b3051SBrian Feldmanchanged passwords will use.
308fb374358SDag-Erling SmørgravValid values include "des", "md5", "blf", "sha256" and "sha512"; see
309fb374358SDag-Erling Smørgrav.Xr crypt 3
310fb374358SDag-Erling Smørgravfor details.
311b5c508fbSRuslan ErmilovNIS clients using a
312b5c508fbSRuslan Ermilov.No non- Ns Fx
313b5c508fbSRuslan ErmilovNIS server should probably use "des".
31466265da7SJoel Dahl.It "passwd_prompt	string		The password prompt presented by"
315708b0425SDavid E. O'Brien.Xr login 1
316e7f8f3b9SFelix Johnson.It "passwordtime	time		Used by"
317e7f8f3b9SFelix Johnson.Xr passwd 1
318e7f8f3b9SFelix Johnsonto set next password expiry date.
31966265da7SJoel Dahl.It "times.allow 	list		List of time periods during which"
320561d61caSDavid Nugentlogins are allowed.
32166265da7SJoel Dahl.It "times.deny	list		List of time periods during which logins are"
322561d61caSDavid Nugentdisallowed.
32366265da7SJoel Dahl.It "ttys.allow	list		List of ttys and ttygroups which users"
324561d61caSDavid Nugentin the class may use for access.
32566265da7SJoel Dahl.It "ttys.deny	list		List of ttys and ttygroups which users"
326561d61caSDavid Nugentin the class may not use for access.
32766265da7SJoel Dahl.It "warnexpire	time		Advance notice for pending account expiry."
32866265da7SJoel Dahl.It "warnpassword	time		Advance notice for pending password expiry."
329708b0425SDavid E. O'Brien.\".It "widepasswords	bool	false	Use the wide password format. The wide password
330708b0425SDavid E. O'Brien.\" format allows up to 128 significant characters in the password.
331561d61caSDavid Nugent.El
332561d61caSDavid Nugent.Pp
333561d61caSDavid NugentThese fields are intended to be used by
334561d61caSDavid Nugent.Xr passwd 1
335561d61caSDavid Nugentand other programs in the login authentication system.
336561d61caSDavid Nugent.Pp
337561d61caSDavid NugentCapabilities that set environment variables are scanned for both
338561d61caSDavid Nugent.Ql \&~
339561d61caSDavid Nugentand
340561d61caSDavid Nugent.Ql \&$
341561d61caSDavid Nugentcharacters, which are substituted for a user's home directory and name
342561d61caSDavid Nugentrespectively.
343561d61caSDavid NugentTo pass these characters literally into the environment variable, escape
344561d61caSDavid Nugentthe character by preceding it with a backslash '\\'.
345561d61caSDavid Nugent.Pp
346561d61caSDavid NugentThe
34732e43d39SMike Pritchard.Em host.allow
348561d61caSDavid Nugentand
34932e43d39SMike Pritchard.Em host.deny
350561d61caSDavid Nugententries are comma separated lists used for checking remote access to the system,
351561d61caSDavid Nugentand consist of a list of hostnames and/or IP addresses against which remote
352561d61caSDavid Nugentnetwork logins are checked.
353561d61caSDavid NugentItems in these lists may contain wildcards in the form used by shell programs
354561d61caSDavid Nugentfor wildcard matching (See
355561d61caSDavid Nugent.Xr fnmatch 3
356561d61caSDavid Nugentfor details on the implementation).
357717feb32SMike PritchardThe check on hosts is made against both the remote system's Internet address
358561d61caSDavid Nugentand hostname (if available).
359561d61caSDavid NugentIf both lists are empty or not specified, then logins from any remote host
360561d61caSDavid Nugentare allowed.
361561d61caSDavid NugentIf host.allow contains one or more hosts, then only remote systems matching
362561d61caSDavid Nugentany of the items in that list are allowed to log in.
363561d61caSDavid NugentIf host.deny contains one or more hosts, then a login from any matching hosts
364561d61caSDavid Nugentwill be disallowed.
365561d61caSDavid Nugent.Pp
366561d61caSDavid NugentThe
36732e43d39SMike Pritchard.Em times.allow
368561d61caSDavid Nugentand
36932e43d39SMike Pritchard.Em times.deny
370561d61caSDavid Nugententries consist of a comma-separated list of time periods during which the users
371561d61caSDavid Nugentin a class are allowed to be logged in.
372561d61caSDavid NugentThese are expressed as one or more day codes followed by a start and end times
373717feb32SMike Pritchardexpressed in 24 hour format, separated by a hyphen or dash.
374717feb32SMike PritchardFor example, MoThSa0200-1300 translates to Monday, Thursday and Saturday between
375717feb32SMike Pritchardthe hours of 2 am and 1 p.m..
376561d61caSDavid NugentIf both of these time lists are empty, users in the class are allowed access at
377561d61caSDavid Nugentany time.
378561d61caSDavid NugentIf
37932e43d39SMike Pritchard.Em times.allow
380561d61caSDavid Nugentis specified, then logins are only allowed during the periods given.
381561d61caSDavid NugentIf
38232e43d39SMike Pritchard.Em times.deny
383561d61caSDavid Nugentis specified, then logins are denied during the periods given, regardless of whether
384561d61caSDavid Nugentone of the periods specified in
38532e43d39SMike Pritchard.Em times.allow
386561d61caSDavid Nugentapplies.
387561d61caSDavid Nugent.Pp
388561d61caSDavid NugentNote that
389561d61caSDavid Nugent.Xr login 1
390561d61caSDavid Nugentenforces only that the actual login falls within periods allowed by these entries.
391561d61caSDavid NugentFurther enforcement over the life of a session requires a separate daemon to
392561d61caSDavid Nugentmonitor transitions from an allowed period to a non-allowed one.
393561d61caSDavid Nugent.Pp
394561d61caSDavid NugentThe
39515b873ccSBill Fenner.Em ttys.allow
396561d61caSDavid Nugentand
39715b873ccSBill Fenner.Em ttys.deny
398561d61caSDavid Nugententries contain a comma-separated list of tty devices (without the /dev/ prefix)
399561d61caSDavid Nugentthat a user in a class may use to access the system, and/or a list of ttygroups
400561d61caSDavid Nugent(See
401561d61caSDavid Nugent.Xr getttyent 3
402561d61caSDavid Nugentand
403561d61caSDavid Nugent.Xr ttys 5
404561d61caSDavid Nugentfor information on ttygroups).
405561d61caSDavid NugentIf neither entry exists, then the choice of login device used by the user is
406561d61caSDavid Nugentunrestricted.
407561d61caSDavid NugentIf only
40815b873ccSBill Fenner.Em ttys.allow
409561d61caSDavid Nugentis specified, then the user is restricted only to ttys in the given
410561d61caSDavid Nugentgroup or device list.
411561d61caSDavid NugentIf only
41215b873ccSBill Fenner.Em ttys.deny
413561d61caSDavid Nugentis specified, then the user is prevented from using the specified devices or
414561d61caSDavid Nugentdevices in the group.
415561d61caSDavid NugentIf both lists are given and are non-empty, the user is restricted to those
41615b873ccSBill Fennerdevices allowed by ttys.allow that are not available by ttys.deny.
417561d61caSDavid Nugent.Pp
418561d61caSDavid NugentThe
4199f7b7e45SDavid Schultz.Em minpasswordlen
420561d61caSDavid Nugentand
4219f7b7e45SDavid Schultz.Em minpasswordcase
4229f7b7e45SDavid Schultzfacilities for enforcing restrictions on password quality, which used
4239f7b7e45SDavid Schultzto be supported by
4249f7b7e45SDavid Schultz.Nm ,
4259f7b7e45SDavid Schultzhave been superseded by the
4269f7b7e45SDavid Schultz.Xr pam_passwdqc 8
4279f7b7e45SDavid SchultzPAM module.
4289c042845SDavid Schultz.Sh RESERVED CAPABILITIES
4299c042845SDavid SchultzThe following capabilities are reserved for the purposes indicated and
4309c042845SDavid Schultzmay be supported by third-party software.
4319c042845SDavid SchultzThey are not implemented in the base system.
4329c042845SDavid Schultz.Bl -column host.accounted indent indent
43392b2c435SOlivier Certner.It Sy "Name	Type	Default	Description"
43466265da7SJoel Dahl.It "accounted	bool	false	Enable session time accounting for all users"
4359c042845SDavid Schultzin this class.
43666265da7SJoel Dahl.It "auth	list	passwd	Allowed authentication styles."
4376599d1e1SYaroslav TykhiyThe first item is the default style.
43866265da7SJoel Dahl.It "auth-" Ns Ar type Ta "list		Allowed authentication styles for the"
4396599d1e1SYaroslav Tykhiyauthentication
4406599d1e1SYaroslav Tykhiy.Ar type .
44166265da7SJoel Dahl.It "autodelete	time		Time after expiry when account is auto-deleted."
44266265da7SJoel Dahl.It "bootfull	bool	false	Enable 'boot only if ttygroup is full' strategy"
4439c042845SDavid Schultzwhen terminating sessions.
44466265da7SJoel Dahl.It "daytime	time		Maximum login time per day."
44566265da7SJoel Dahl.It "expireperiod	time		Time for expiry allocation."
44666265da7SJoel Dahl.It "graceexpire 	time		Grace days for expired account."
44766265da7SJoel Dahl.It "gracetime	time		Additional grace login time allowed."
44866265da7SJoel Dahl.It "host.accounted	list		List of remote host wildcards from which"
4499c042845SDavid Schultzlogin sessions will be accounted.
45066265da7SJoel Dahl.It "host.exempt 	list		List of remote host wildcards from which"
4519c042845SDavid Schultzlogin session accounting is exempted.
45266265da7SJoel Dahl.It "idletime	time		Maximum idle time before logout."
45366265da7SJoel Dahl.It "minpasswordlen	number	6	The minimum length a local"
4549c042845SDavid Schultzpassword may be.
45566265da7SJoel Dahl.It "mixpasswordcase	bool	true	Whether"
4569c042845SDavid Schultz.Xr passwd 1
4579c042845SDavid Schultzwill warn the user if an all lower case password is entered.
45866265da7SJoel Dahl.It "monthtime 	time		Maximum login time per month."
45966265da7SJoel Dahl.It "refreshtime 	time		New time allowed on account refresh."
46066265da7SJoel Dahl.It "refreshperiod	str		How often account time is refreshed."
46166265da7SJoel Dahl.It "sessiontime 	time		Maximum login time per session."
46266265da7SJoel Dahl.It "sessionlimit	number		Maximum number of concurrent"
4639c042845SDavid Schultzlogin sessions on ttys in any group.
46466265da7SJoel Dahl.It "ttys.accounted	list		List of ttys and ttygroups for which"
4659c042845SDavid Schultzlogin accounting is active.
46666265da7SJoel Dahl.It "ttys.exempt	list		List of ttys and ttygroups for which login accounting"
4679c042845SDavid Schultzis exempt.
46866265da7SJoel Dahl.It "warntime	time		Advance notice for pending out-of-time."
46966265da7SJoel Dahl.It "weektime	time		Maximum login time per week."
4709c042845SDavid Schultz.El
4719c042845SDavid Schultz.Pp
4729c042845SDavid SchultzThe
4739c042845SDavid Schultz.Em ttys.accounted
4749c042845SDavid Schultzand
4759c042845SDavid Schultz.Em ttys.exempt
4769c042845SDavid Schultzfields operate in a similar manner to
4779c042845SDavid Schultz.Em ttys.allow
4789c042845SDavid Schultzand
4799c042845SDavid Schultz.Em ttys.deny
4809c042845SDavid Schultzas explained
4819c042845SDavid Schultzabove.
4829c042845SDavid SchultzSimilarly with the
4839c042845SDavid Schultz.Em host.accounted
4849c042845SDavid Schultzand
4859c042845SDavid Schultz.Em host.exempt
4869c042845SDavid Schultzlists.
487561d61caSDavid Nugent.Sh SEE ALSO
488eabfa0f4SNik Clayton.Xr cap_mkdb 1 ,
48975141cc9SWolfram Schneider.Xr login 1 ,
4901575f75dSPeter Pentchev.Xr chroot 2 ,
491561d61caSDavid Nugent.Xr getcap 3 ,
49232e43d39SMike Pritchard.Xr getttyent 3 ,
493561d61caSDavid Nugent.Xr login_cap 3 ,
494561d61caSDavid Nugent.Xr login_class 3 ,
4959f7b7e45SDavid Schultz.Xr pam 3 ,
496b90b0ce7SDavid E. O'Brien.Xr passwd 5 ,
4979f7b7e45SDavid Schultz.Xr ttys 5 ,
4981575f75dSPeter Pentchev.Xr ftpd 8 ,
4999f7b7e45SDavid Schultz.Xr pam_passwdqc 8
500bc89b58dSGordon Bergling.Sh HISTORY
501bc89b58dSGordon BerglingThe file
502bc89b58dSGordon Bergling.Nm
503bc89b58dSGordon Berglingfirst appeared in
504bc89b58dSGordon Bergling.Fx 2.1.5 .
505