Merge commit 'dea58231324dba08972c488dcdedbab5c528ac8a'
[unleashed.git] / share / man / man5 / check-password.4th.5
blob3446df97997a113dfa81f628755ff370c928b4c4
1 .\" Copyright (c) 2011-2015 Devin Teske
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .Dd Apr 22, 2017
26 .Dt CHECK-PASSWORD.4TH 5
27 .Os
28 .Sh NAME
29 .Nm check-password.4th
30 .Nd loader password-checking boot module
31 .Sh DESCRIPTION
32 The file that goes by the name of
33 .Nm
34 is a set of commands designed to do one or more of the following:
35 .Pp
36 .Dl o Prevent booting without password
37 .Dl o Prevent modification of boot options without password
38 .Pp
39 The commands of
40 .Nm
41 by themselves are not enough for most uses.
42 Please refer to the
43 examples below for the most common situations, and to
44 .Xr loader 5
45 for additional commands.
46 .Pp
47 Before using any of the commands provided in
48 .Nm ,
49 it must be included
50 through the command:
51 .Pp
52 .Dl include check-password.4th
53 .Pp
54 This line is present in
55 .Pa /boot/forth/loader.4th
56 file, so it is not needed (and should not be re-issued) in a normal setup.
57 .Pp
58 The commands provided by it are:
59 .Pp
60 .Bl -tag -width disable-module_module -compact -offset indent
61 .It Ic check-password
62 Multi-purpose function that can protect the interactive boot menu,
63 prevent boot without password
64 .Pq depending on Xr loader.conf 4 settings .
65 .Pp
66 First checks
67 .Va bootlock_password
68 and if-set, the user cannot continue until the correct password is entered.
69 .Pp
70 Last, checks
71 .Va password
72 and if-set, tries to
73 .Ic autoboot
74 and only prompts for password on failure or user-interrupt.
75 See
76 .Xr loader.conf 4
77 for additional information.
78 .El
79 .Pp
80 The environment variables that effect its behavior are:
81 .Bl -tag -width bootlock_password -offset indent
82 .It Va bootlock_password
83 Sets the bootlock password (up to 16 characters long) that is required by
84 .Ic check-password
85 to be entered before the system is allowed to boot.
86 .It Va password
87 Sets the password (up to 16 characters long) that is required by
88 .Ic check-password
89 before the user is allowed to visit the boot menu.
90 .El
91 .Sh FILES
92 .Bl -tag -width /boot/forth/check-password.4th -compact
93 .It Pa /boot/zfsloader
94 The
95 .Xr zfsloader 5 .
96 .It Pa /boot/forth/check-password.4th
97 .Nm
98 itself.
99 .It Pa /boot/loader.rc
100 .Xr loader 5
101 bootstrapping script.
103 .Sh EXAMPLES
104 Standard i386
105 .Pa /boot/loader.rc :
107 .Bd -literal -offset indent -compact
108 include /boot/forth/loader.4th
109 check-password
112 Set a password in
113 .Xr loader.conf 4
114 to prevent modification of boot options:
116 .Bd -literal -offset indent -compact
117 password="abc123"
120 Set a password in
121 .Xr loader.conf 4
122 to prevent booting without password:
124 .Bd -literal -offset indent -compact
125 bootlock_password="boot"
127 .Sh SEE ALSO
128 .Xr loader.conf 4 ,
129 .Xr loader 5 ,
130 .Xr loader.4th 5