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